FHIR © HL7.org  |  Server Home  |  FHIR Server FHIR Server 3.7.11  |  FHIR Version n/a  User: [n/a]

Resource Measure/FHIR Server from package gov.healthit.ecqi.ecqms#current (203 ms)

Package gov.healthit.ecqi.ecqms
Type Measure
Id Id
FHIR Version R4
Source http://ecqi.healthit.gov/ecqms/https://build.fhir.org/ig/cqframework/ecqm-content-qicore-2024/Measure-CMS506FHIRSafeUseofOpioids.html
Url https://madie.cms.gov/Measure/CMS506FHIRSafeUseofOpioids
Version Draft based on 0.2.001
Status draft
Date 2024-12-16T18:17:11+00:00
Name CMS506FHIRSafeUseofOpioids
Title Safe Use of Opioids Concurrent PrescribingFHIR
Experimental False
Description Proportion of inpatient hospitalizations for patients 18 years of age and older prescribed, or continued on, two or more opioids or an opioid and benzodiazepine concurrently at discharge
Purpose UNKNOWN
Copyright Limited proprietary coding is contained in the Measure specifications for user convenience. Users of proprietary code sets should obtain all necessary licenses from the owners of the code sets. Mathematica disclaims all liability for use or accuracy of any third-party codes contained in the specifications. CPT(R) contained in the measure specifications is copyright 2004-2024 American Medical Association. LOINC(R) copyright 2004-2024 Regenstrief Institute, Inc. This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2024 International Health Terminology Standards Development Organisation. ICD-10 copyright 2024 World Health Organization. All Rights Reserved.

Resources that use this resource

No resources found


Resources that this resource uses

No resources found



Narrative

Note: links and images are rebased to the (stated) source

Title: Safe Use of Opioids Concurrent PrescribingFHIR
Id: CMS506FHIRSafeUseofOpioids
Version: Draft based on 0.2.001
Url: Safe Use of Opioids Concurrent PrescribingFHIR
Short Name Identifier:

CMS506FHIR

Version Independent Identifier:

urn:uuid:95d529af-66b4-4cfd-bc1f-f43704dc47ad

Version Specific Identifier:

urn:uuid:c8f62fe1-8d6d-4e05-9574-7f89899e4ec7

Endorser (CMS Consensus Based Entity) Identifier:

3316e

Publisher (CMS) Identifier:

506FHIR

Effective Period: 2026-01-01..2026-12-31
Status: draft
Publisher: Centers for Medicare & Medicaid Services (CMS)
Author: Mathematica
Description:

Proportion of inpatient hospitalizations for patients 18 years of age and older prescribed, or continued on, two or more opioids or an opioid and benzodiazepine concurrently at discharge

Purpose:

UNKNOWN

Copyright:

Limited proprietary coding is contained in the Measure specifications for user convenience. Users of proprietary code sets should obtain all necessary licenses from the owners of the code sets. Mathematica disclaims all liability for use or accuracy of any third-party codes contained in the specifications.

CPT(R) contained in the measure specifications is copyright 2004-2024 American Medical Association. LOINC(R) copyright 2004-2024 Regenstrief Institute, Inc. This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2024 International Health Terminology Standards Development Organisation. ICD-10 copyright 2024 World Health Organization. All Rights Reserved.

Disclaimer:

These performance measures are not clinical guidelines, do not establish a standard of medical care, and have not been tested for all potential applications.

THE MEASURES AND SPECIFICATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND.

Due to technical limitations, registered trademarks are indicated by (R) or [R] and unregistered trademarks are indicated by (TM) or [TM].

Rationale:

Unintentional opioid overdose fatalities have become a major public health concern in the United States (Rudd, Aleshire, Zibbel, & Gladden, 2016). Reducing the number of unintentional overdoses has become a priority for numerous federal organizations including, but not limited to, the Centers for Disease Control and Prevention (CDC), the Federal Interagency Workgroup for Opioid Adverse Drug Events, and the Substance Abuse and Mental Health Services Administration.

Concurrent prescriptions of opioids or opioids and benzodiazepines places patients at a greater risk of unintentional overdose due to the increased risk of respiratory depression (Dowell, Haegerich, & Chou, 2016; Dowell, Ragan, Jones, Baldwin, & Chou, 2022). An analysis of national prescribing patterns shows that more than half of patients who received an opioid prescription in 2009 had filled another opioid prescription within the previous 30 days (National Institute on Drug Abuse, 2011). Studies of multiple claims and prescription databases have shown that between 5%-15% of patients receive concurrent opioid prescriptions and 5%-20% of patients receive concurrent opioid and benzodiazepine prescriptions across various settings (Liu et al., 2013; Mack et al., 2015, Park et al., 2015). Patients who have multiple opioid prescriptions have an increased risk for overdose (Jena et al., 2014). Rates of fatal overdose are ten times higher in patients who are co-dispensed opioid analgesics and benzodiazepines than opioids alone (Dasgupta et al., 2015). The number of opioid overdose deaths involving benzodiazepines increased 14% on average each year from 2006 to 2011, while the number of opioid analgesic overdose deaths not involving benzodiazepines did not change significantly (Jones & McAninch, 2015). Furthermore, concurrent use of benzodiazepines with opioids was prevalent in 31%-51% of fatal overdoses (Dowell, Haegerich, & Chou, 2016). One study found that eliminating concurrent use of opioids and benzodiazepines could reduce the risk of opioid overdose-related emergency department (ED) and inpatient visits by 15% and potentially could have prevented an estimated 2,630 deaths related to opioid painkiller overdoses in 2015 (Sun, Dixit, Humphreys, Darnall, & Mackey, 2017).

A study on The Opioid Safety Initiative in the Veterans Health Administration (VHA), which includes an opioid and benzodiazepine concurrent prescribing measure that this measure is based on, was associated with a decrease of 20.67% overall and 0.86% patients per month (781 patients per month) receiving concurrent benzodiazepine with an opioid among all adult VHA patients who filled outpatient opioid prescriptions from October 2012 to September 2014 (Lin, Bohnert, Kerns, Clay, Ganoczy, & Ilgen, 2017).

Adopting a measure that calculates the proportion of patients with two or more opioids or opioids and benzodiazepines concurrently has the potential to reduce preventable mortality and reduce the costs associated with adverse events related to opioid use by (1) encouraging providers to identify patients with concurrent prescriptions of opioids or opioids and benzodiazepines and (2) discouraging providers from prescribing two or more opioids or opioids and benzodiazepines concurrently.

Clinical recommendation statement:

The CDC Clinical Practice Guideline for Prescribing Opioids for Pain — United States, 2022 recommends that clinicians should:

  • “[Use strategies minimizing] opioid use…for both opioid-naïve and opioid-tolerant patients with acute pain when possible. If patients receiving long-term opioid therapy require additional medication for acute pain, nonopioid medications should be used when possible.”
  • ”Use particular caution when prescribing opioid pain medication and benzodiazepines concurrently."
  • “Review increased risks for respiratory depression when opioids are taken with benzodiazepines, other sedatives, alcohol, nonprescribed or illicit drugs (e.g., heroin), or other opioids (see Recommendations 8 and 11)”
  • “Closely monitor patients who are unable to taper and who continue on high-dose or otherwise high-risk opioid regimens (e.g., opioids prescribed concurrently with benzodiazepines) and should work with patients to mitigate overdose risk (e.g., by providing overdose education and naloxone) (see Recommendation 8).”
  • "Discuss information from the PDMP with the patient and confirm that the patient is aware of any additional prescriptions.”
  • “Discuss safety concerns, including increased risk for respiratory depression and overdose, with patients found to be receiving overlapping prescription opioids from multiple clinicians who are not coordinating the patient’s care or patients who are receiving medications that increase risk when combined with opioids (e.g., benzodiazepines) (see Recommendation 11), and offer naloxone (see Recommendation 8)."
  • "Discuss safety concerns with other clinicians who are prescribing controlled substances for the patient. Ideally, clinicians should first discuss concerns with the patient and inform them that they plan to coordinate care with their other clinicians to improve the patient’s safety.”

In addition to the 2022 CDC Clinical Practice Guideline for Prescribing Opioids for Pain, opioid prescribing guidelines issued by various state agencies and professional societies for various settings agree with the recommendation to avoid concurrently prescribing opioids (American Academy of Emergency Medicine (AAEM), 2013; and Washington Agency Medical Directors’ Group (WAMDG), 2015), and opioids and benzodiazepines (WAMDG, 2015; American Society of Interventional Pain Physicians (ASIPP), 2012;, and New York City Department Of Health and Mental Hygiene (NYC DPOMH), 2013) whenever possible as the combination of these medications may potentiate opioid-induced respiratory depression.

Guidance (Usage): Clinician judgement, clinical appropriateness, or both may indicate concurrent prescribing of two unique opioids or an opioid and benzodiazepine is medically necessary, thus the measure is not expected to have a zero rate. Inpatient hospitalizations with discharge medications of an opioid or benzodiazepine prescription should be included in the initial population. Inpatient hospitalizations with discharge medications of two or more opioids or an opioid and benzodiazepine resulting in concurrent therapy at discharge should be included in the numerator. Each benzodiazepine and opioid included on the medication discharge list is considered a unique prescription. The denominator population includes patients with inpatient hospitalizations and patients from Acute Hospital Care at Home programs, who are treated and billed as inpatients but receive care in their home. This eCQM is an episode-based measure. An episode is defined as each inpatient hospitalization or encounter that ends during the measurement period. This FHIR-based measure has been derived from the QDM-based measure: CMS 506v8.0. Please refer to the HL7 QI-Core Implementation Guide (https://hl7.org/fhir/us/qicore/STU4.1.1/) for more information on QI-Core and mapping recommendations from QDM to QI-Core 4.1.1 (https://hl7.org/fhir/us/qicore/STU4.1.1/qdm-to-qicore.html).
Population Criteria:
67460a2f46b6174510cfea5f
Initial Population: Inpatient hospitalizations that end during the measurement period, where the patient is 18 years of age and older at the start of the encounter and prescribed one opioid and/or benzodiazepine at discharge
Denominator: Equals Initial Population
Denominator Exclusion: Inpatient hospitalizations where patients have cancer pain that begins prior to or during the encounter or are ordered or are receiving palliative or hospice care (including comfort measures, terminal care, and dying care) during the hospitalization or in an emergency department encounter or observation stay immediately prior to hospitalization, patients receiving medication for opioid use disorder (OUD) with active OUD diagnosis or Opioid Medication Assisted Treatment (MAT), patients with sickle cell disease, patients discharged to another inpatient care facility or left against medical advice, and patients who expire during the inpatient stay
Numerator: Inpatient hospitalizations where the patient is prescribed two or more opioids or an opioid and benzodiazepine at discharge
Supplemental Data Elements:

SDE Ethnicity

SDE Payer

SDE Race

SDE Sex

Supplemental Data Guidance : For every patient evaluated by this measure also identify payer, race, ethnicity and sex; SDE Ethnicity SDE Payer SDE Race SDE Sex
Libraries:
CMS506FHIRSafeUseofOpioids
Terminology and Other Dependencies:
  • Library/SupplementalDataElements|3.5.000
  • Library/CQMCommon|2.2.000
  • Library/FHIRHelpers|4.4.000
  • Library/QICoreCommon|2.1.000
  • AdministrativeGender
  • MedicationRequest Category Codes
  • Condition Category Codes
  • US Core Condition Category Extension Codes
  • Encounter Inpatient
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.241
  • Schedule IV Benzodiazepines
  • Payer
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.180
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.175
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.269
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.177
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.171
  • Palliative or Hospice Care
  • Observation Services
  • Emergency Department Visit
  • Discharge To Acute Care Facility
  • Hospice Care Referral or Admission
  • Patient Expired
  • Left Against Medical Advice
  • Parameters:
    name use min max type
    Measurement Period In 0 1 Period
    SDE Sex Out 0 1 Coding
    Numerator Out 0 * Resource
    Denominator Out 0 * Resource
    SDE Payer Out 0 * Resource
    Initial Population Out 0 * Resource
    SDE Ethnicity Out 0 1 Resource
    Denominator Exclusion Out 0 * Resource
    SDE Race Out 0 1 Resource
    DataRequirements:
    Resource Type Resource Elements Valueset Name Valueset
    Patient(QICorePatient) ethnicity race
    Encounter(QICoreEncounter) type status status.value period condition condition.reference condition.reference.value hospitalization hospitalization.dischargeDisposition Encounter Inpatient Encounter Inpatient
    Encounter(QICoreEncounter) type status status.value period condition condition.reference condition.reference.value hospitalization hospitalization.dischargeDisposition Observation Services Observation Services
    Encounter(QICoreEncounter) type status status.value period condition condition.reference condition.reference.value hospitalization hospitalization.dischargeDisposition Emergency Department Visit Emergency Department Visit
    Medication(QICoreMedication) id
    Medication(QICoreMedication) id
    Medication(QICoreMedication) id
    MedicationRequest(QICoreMedicationRequest) medication status status.value intent intent.value authoredOn authoredOn.value Schedule II, III and IV Opioid Medications http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.241
    MedicationRequest(QICoreMedicationRequest) medication status status.value intent intent.value authoredOn authoredOn.value Schedule IV Benzodiazepines Schedule IV Benzodiazepines
    MedicationRequest(QICoreMedicationRequest) medication status status.value intent intent.value authoredOn authoredOn.value Schedule IV Benzodiazepines Schedule IV Benzodiazepines
    MedicationRequest(QICoreMedicationRequest) medication.reference status status.value intent intent.value authoredOn authoredOn.value medication
    MedicationRequest(QICoreMedicationRequest) medication status status.value intent intent.value authoredOn authoredOn.value Medications for Opioid Use Disorder (MOUD) http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.269
    Coverage(QICoreCoverage) type period Payer Type Payer
    Condition(QICoreCondition) id id.value code
    Condition(QICoreCondition) code Opioid Use Disorder http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.171
    Condition(QICoreCondition) code Cancer Related Pain http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.180
    Condition(QICoreCondition) code Sickle Cell Disease with and without Crisis http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.175
    Procedure(QICoreProcedure) code performed Opioid Medication Assisted Treatment (MAT) http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.177
    Procedure(QICoreProcedure) code Palliative or Hospice Care Palliative or Hospice Care
    ServiceRequest(QICoreServiceRequest) code Palliative or Hospice Care Palliative or Hospice Care
    Direct Reference Codes:
    display code system
    Male M http://hl7.org/fhir/administrative-gender
    Female F http://hl7.org/fhir/administrative-gender
    Community community http://terminology.hl7.org/CodeSystem/medicationrequest-category
    Discharge discharge http://terminology.hl7.org/CodeSystem/medicationrequest-category
    Problem List Item problem-list-item http://terminology.hl7.org/CodeSystem/condition-category
    Health Concern health-concern http://hl7.org/fhir/us/core/CodeSystem/condition-category
    Logic Definitions:
    Group Scoring Population Criteria Expression
    67460a2f46b6174510cfea5f Group scoring: proportion
    Type:

    Process

    Rate Aggregation: None
    Improvement Notation:

    Decreased score indicates improvement

    Initial Population
    define "Initial Population":
      "Inpatient Encounters with an Opioid or Benzodiazepine at Discharge"
    Denominator
    define "Denominator":
      "Initial Population"
    Denominator Exclusion
    define "Denominator Exclusion":
      /*Excludes encounters of patients with cancer pain or who are receiving palliative or hospice care at the time of the encounter or who receive treatment for opioid use disorder, have sickle cell disease, or who are discharged to another inpatient care facility or discharged against medical advice, or expire during the inpatient stay*/
      
      ( "Inpatient Encounters with an Opioid or Benzodiazepine at Discharge" InpatientEncounter
          where exists ( ["Condition": "Cancer Related Pain"] CancerPain
              where ( CancerPain.isProblemListItem ( )
                  or CancerPain.isHealthConcern ( )
              )
                and CancerPain.prevalenceInterval ( ) overlaps day of InpatientEncounter.period
          )
            or exists ( ( InpatientEncounter.encounterDiagnosis ( ) ) InpatientEncounterDiagnosis
                where InpatientEncounterDiagnosis.code in "Cancer Related Pain"
            )
            or exists ( ["Condition": "Sickle Cell Disease with and without Crisis"] SickleCellDisease
                where SickleCellDisease.prevalenceInterval ( ) overlaps day of InpatientEncounter.period
            )
            or exists ( "Treatment for Opioid Use Disorders" OUDTreatment
                where OUDTreatment.authoredOn during day of InpatientEncounter.period
            )
            or exists ( "Intervention Palliative or Hospice Care" PalliativeOrHospiceCare
                where Coalesce(start of PalliativeOrHospiceCare.performed.toInterval(), PalliativeOrHospiceCare.authoredOn) during day of InpatientEncounter."hospitalizationWithObservation" ( )
            )
            or ( InpatientEncounter.hospitalization.dischargeDisposition in "Discharge To Acute Care Facility"
                or InpatientEncounter.hospitalization.dischargeDisposition in "Hospice Care Referral or Admission"
                or InpatientEncounter.hospitalization.dischargeDisposition in "Patient Expired"
                or InpatientEncounter.hospitalization.dischargeDisposition in "Left Against Medical Advice"
            )
      )
    Numerator
    define "Numerator":
      /*Encounters of patients prescribed two or more opioids or an opioid and benzodiazepine at discharge.*/
      
      ( ( "Inpatient Encounters with an Opioid or Benzodiazepine at Discharge" InpatientEncounter
            where ( Count("Opioid at Discharge" OpioidMedications
                  where OpioidMedications.authoredOn during day of InpatientEncounter.period
                  return distinct OpioidMedications.medication
              ) >= 2
            )
              or exists ( "Opioid at Discharge" OpioidDischargeMedications
                  where OpioidDischargeMedications.authoredOn during day of InpatientEncounter.period
                    and exists "Benzodiazepine at Discharge" BenzodiazepineDischargeMedication
                      where BenzodiazepineDischargeMedication.authoredOn during day of InpatientEncounter.period
              )
        )
      )
    Library Name Name
    SupplementalDataElements SDE Sex
    define "SDE Sex":
      case
        when Patient.gender = 'male' then "M"
        when Patient.gender = 'female' then "F"
        else null
      end
    Library Name Name
    CMS506FHIRSafeUseofOpioids SDE Sex
    define "SDE Sex":
      SDE."SDE Sex"
    Library Name Name
    CQMCommon Inpatient Encounter
    define "Inpatient Encounter":
      [Encounter: "Encounter Inpatient"] EncounterInpatient
    		where EncounterInpatient.status = 'finished'
    		and EncounterInpatient.period ends during day of "Measurement Period"
    Library Name Name
    CMS506FHIRSafeUseofOpioids Inpatient Encounter with Age Greater than or Equal to 18
    define "Inpatient Encounter with Age Greater than or Equal to 18":
      CQMCommon."Inpatient Encounter" InpatientHospitalEncounter
        where AgeInYearsAt(date from start of InpatientHospitalEncounter.period) >= 18
    Library Name Name
    CMS506FHIRSafeUseofOpioids Opioid at Discharge
    define "Opioid at Discharge":
      ( ["MedicationRequest": "Schedule II, III and IV Opioid Medications"] OpioidMedications
        where ( OpioidMedications.isCommunity ( )
            or OpioidMedications.isDischarge ( )
        ) ) OpioidDischargeMedication
        where OpioidDischargeMedication.status in { 'active', 'completed' }
          and OpioidDischargeMedication.intent = 'order'
    Library Name Name
    CMS506FHIRSafeUseofOpioids Benzodiazepine at Discharge
    define "Benzodiazepine at Discharge":
      ( ["MedicationRequest": medication in "Schedule IV Benzodiazepines"] BenzoMedications
        where ( BenzoMedications.isCommunity ( )
            or BenzoMedications.isDischarge ( )
        ) ) BenzodiazepineDischargeMedication
        where BenzodiazepineDischargeMedication.status in { 'active', 'completed' }
          and BenzodiazepineDischargeMedication.intent = 'order'
    Library Name Name
    CMS506FHIRSafeUseofOpioids Inpatient Encounters with an Opioid or Benzodiazepine at Discharge
    define "Inpatient Encounters with an Opioid or Benzodiazepine at Discharge":
    /*Captures encounters of patients with an opioid and/or benzodiazepine at discharge*/
      
      "Inpatient Encounter with Age Greater than or Equal to 18" InpatientEncounter
        with ( "Opioid at Discharge"
          union "Benzodiazepine at Discharge" ) OpioidOrBenzodiazepineAtDischarge
          such that OpioidOrBenzodiazepineAtDischarge.authoredOn during day of InpatientEncounter.period
    Library Name Name
    CMS506FHIRSafeUseofOpioids Numerator
    define "Numerator":
      /*Encounters of patients prescribed two or more opioids or an opioid and benzodiazepine at discharge.*/
      
      ( ( "Inpatient Encounters with an Opioid or Benzodiazepine at Discharge" InpatientEncounter
            where ( Count("Opioid at Discharge" OpioidMedications
                  where OpioidMedications.authoredOn during day of InpatientEncounter.period
                  return distinct OpioidMedications.medication
              ) >= 2
            )
              or exists ( "Opioid at Discharge" OpioidDischargeMedications
                  where OpioidDischargeMedications.authoredOn during day of InpatientEncounter.period
                    and exists "Benzodiazepine at Discharge" BenzodiazepineDischargeMedication
                      where BenzodiazepineDischargeMedication.authoredOn during day of InpatientEncounter.period
              )
        )
      )
    Library Name Name
    CMS506FHIRSafeUseofOpioids Initial Population
    define "Initial Population":
      "Inpatient Encounters with an Opioid or Benzodiazepine at Discharge"
    Library Name Name
    CMS506FHIRSafeUseofOpioids Denominator
    define "Denominator":
      "Initial Population"
    Library Name Name
    SupplementalDataElements SDE Payer
    define "SDE Payer":
      [Coverage: type in "Payer Type"] Payer
        return {
          code: Payer.type,
          period: Payer.period
        }
    Library Name Name
    CMS506FHIRSafeUseofOpioids SDE Payer
    define "SDE Payer":
      SDE."SDE Payer"
    Library Name Name
    SupplementalDataElements SDE Ethnicity
    define "SDE Ethnicity":
      Patient.ethnicity E
        return Tuple {
          codes: { E.ombCategory } union E.detailed,
          display: E.text
        }
    Library Name Name
    CMS506FHIRSafeUseofOpioids SDE Ethnicity
    define "SDE Ethnicity":
      SDE."SDE Ethnicity"
    Library Name Name
    CMS506FHIRSafeUseofOpioids Treatment for Opioid Use Disorders
    define "Treatment for Opioid Use Disorders":
      ( ["MedicationRequest": "Medications for Opioid Use Disorder (MOUD)"] MedicationTreatment
          with ["Procedure": "Opioid Medication Assisted Treatment (MAT)"] MAT
            such that MedicationTreatment.authoredOn during day of MAT.performed.toInterval ( )
              and MedicationTreatment.authoredOn during day of "Measurement Period"
      )
        union ( ["MedicationRequest": "Medications for Opioid Use Disorder (MOUD)"] MedicationTreatment
            with ["Condition": "Opioid Use Disorder"] OUD
              such that MedicationTreatment.authoredOn during day of OUD.prevalenceInterval ( )
                and OUD.prevalenceInterval ( ) overlaps day of "Measurement Period"
        )
    Library Name Name
    CMS506FHIRSafeUseofOpioids Intervention Palliative or Hospice Care
    define "Intervention Palliative or Hospice Care":
      ["ServiceRequest": "Palliative or Hospice Care"]
        union ["Procedure": "Palliative or Hospice Care"]
    Library Name Name
    CMS506FHIRSafeUseofOpioids Denominator Exclusion
    define "Denominator Exclusion":
      /*Excludes encounters of patients with cancer pain or who are receiving palliative or hospice care at the time of the encounter or who receive treatment for opioid use disorder, have sickle cell disease, or who are discharged to another inpatient care facility or discharged against medical advice, or expire during the inpatient stay*/
      
      ( "Inpatient Encounters with an Opioid or Benzodiazepine at Discharge" InpatientEncounter
          where exists ( ["Condition": "Cancer Related Pain"] CancerPain
              where ( CancerPain.isProblemListItem ( )
                  or CancerPain.isHealthConcern ( )
              )
                and CancerPain.prevalenceInterval ( ) overlaps day of InpatientEncounter.period
          )
            or exists ( ( InpatientEncounter.encounterDiagnosis ( ) ) InpatientEncounterDiagnosis
                where InpatientEncounterDiagnosis.code in "Cancer Related Pain"
            )
            or exists ( ["Condition": "Sickle Cell Disease with and without Crisis"] SickleCellDisease
                where SickleCellDisease.prevalenceInterval ( ) overlaps day of InpatientEncounter.period
            )
            or exists ( "Treatment for Opioid Use Disorders" OUDTreatment
                where OUDTreatment.authoredOn during day of InpatientEncounter.period
            )
            or exists ( "Intervention Palliative or Hospice Care" PalliativeOrHospiceCare
                where Coalesce(start of PalliativeOrHospiceCare.performed.toInterval(), PalliativeOrHospiceCare.authoredOn) during day of InpatientEncounter."hospitalizationWithObservation" ( )
            )
            or ( InpatientEncounter.hospitalization.dischargeDisposition in "Discharge To Acute Care Facility"
                or InpatientEncounter.hospitalization.dischargeDisposition in "Hospice Care Referral or Admission"
                or InpatientEncounter.hospitalization.dischargeDisposition in "Patient Expired"
                or InpatientEncounter.hospitalization.dischargeDisposition in "Left Against Medical Advice"
            )
      )
    Library Name Name
    SupplementalDataElements SDE Race
    define "SDE Race":
      Patient.race R
        return Tuple {
          codes: R.ombCategory union R.detailed,
          display: R.text
        }
    Library Name Name
    CMS506FHIRSafeUseofOpioids SDE Race
    define "SDE Race":
      SDE."SDE Race"
    Library Name Name
    QICoreCommon isCommunity
    /*
    @description: Returns true if the given MedicationRequest has a category of Community
    */
    define fluent function isCommunity(medicationRequest MedicationRequest):
      exists (medicationRequest.category C
        where C ~ Community
      )
    Library Name Name
    FHIRHelpers ToConcept
    /*
    @description: Converts the given FHIR [CodeableConcept](https://hl7.org/fhir/datatypes.html#CodeableConcept) value to a CQL Concept.
    */
    define function ToConcept(concept FHIR.CodeableConcept):
        if concept is null then
            null
        else
            System.Concept {
                codes: concept.coding C return ToCode(C),
                display: concept.text.value
            }
    Library Name Name
    QICoreCommon isDischarge
    /*
    @description: Returns true if the given MedicationRequest has a category of Discharge
    */
    define fluent function isDischarge(medicationRequest MedicationRequest):
      exists (medicationRequest.category C
        where C ~ Discharge
      )
    Library Name Name
    FHIRHelpers ToString
    define function ToString(value uri): value.value
    Library Name Name
    FHIRHelpers ToCode
    /*
    @description: Converts the given FHIR [Coding](https://hl7.org/fhir/datatypes.html#Coding) value to a CQL Code.
    */
    define function ToCode(coding FHIR.Coding):
        if coding is null then
            null
        else
            System.Code {
              code: coding.code.value,
              system: coding.system.value,
              version: coding.version.value,
              display: coding.display.value
            }
    Library Name Name
    QICoreCommon isProblemListItem
    /*
    @description: Returns true if the given condition is a problem list item.
    */
    define fluent function isProblemListItem(condition Condition):
      exists (condition.category C
        where C ~ "problem-list-item"
      )
    Library Name Name
    QICoreCommon isHealthConcern
    /*
    @description: Returns true if the given condition is a health concern
    */
    define fluent function isHealthConcern(condition Condition):
      exists (condition.category C
        where C ~ "health-concern"
      )
    Library Name Name
    QICoreCommon prevalenceInterval
    /*
    @description: Returns an interval representing the normalized prevalence period of a given Condition.
    @comment: Uses the ToInterval and ToAbatementInterval functions to determine the widest potential interval from
    onset to abatement as specified in the given Condition. If the condition is active, or has an abatement date the resulting 
    interval will have a closed ending boundary. Otherwise, the resulting interval will have an open ending boundary.
    */
    define fluent function prevalenceInterval(condition Condition):
    if condition.clinicalStatus ~ "active"
      or condition.clinicalStatus ~ "recurrence"
      or condition.clinicalStatus ~ "relapse" then
      Interval[start of condition.onset.toInterval(), end of condition.abatementInterval()]
    else
        (end of condition.abatementInterval()) abatementDate
        return if abatementDate is null then
          Interval[start of condition.onset.toInterval(), abatementDate)
        else
          Interval[start of condition.onset.toInterval(), abatementDate]
    Library Name Name
    CQMCommon encounterDiagnosis
    /*
    @description: Returns the Condition resources referenced by the diagnosis element of the Encounter
    */
    define fluent function encounterDiagnosis(Encounter Encounter ):
      Encounter.diagnosis D
        return singleton from ([Condition] C where C.id = D.condition.reference.getId())
    Library Name Name
    QICoreCommon getId
    /*
    @description: Returns the tail of the given uri (i.e. everything after the last slash in the URI).
    @comment: This function can be used to determine the logical id of a given resource. It can be used in
    a single-server environment to trace references. However, this function does not attempt to resolve
    or distinguish the base of the given url, and so cannot be used safely in multi-server environments.
    */
    define fluent function getId(uri String):
      Last(Split(uri, '/'))
    Library Name Name
    CQMCommon hospitalizationWithObservation
    /*
    @description: Hospitalization with Observation returns the total interval from the start of any immediately prior emergency department visit through the observation visit to the discharge of the given encounter
    */
    define fluent function hospitalizationWithObservation(TheEncounter Encounter ):
      TheEncounter Visit
      		let ObsVisit: Last([Encounter: "Observation Services"] LastObs
      				where LastObs.status = 'finished'
                and LastObs.period ends 1 hour or less on or before start of Visit.period
      				sort by end of period
      			),
      			VisitStart: Coalesce(start of ObsVisit.period, start of Visit.period),
      			EDVisit: Last([Encounter: "Emergency Department Visit"] LastED
      				where LastED.status = 'finished'
                and LastED.period ends 1 hour or less on or before VisitStart
      				sort by end of period
      			)
      		return Interval[Coalesce(start of EDVisit.period, VisitStart), end of Visit.period]

    Source

    {
      "resourceType" : "Measure",
      "id" : "CMS506FHIRSafeUseofOpioids",
      "meta" : {
        "profile" : [
          "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/computable-measure-cqfm",
          "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/publishable-measure-cqfm",
          "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/executable-measure-cqfm"
        ]
      },
      "text" : {
        "status" : "extensions",
        "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n <table class=\"grid dict\">\n \n <tr>\n <th scope=\"row\"><b>Title: </b></th>\n <td style=\"padding-left: 4px;\">Safe Use of Opioids Concurrent PrescribingFHIR</td>\n </tr>\n \n\n \n\n \n <tr>\n <th scope=\"row\"><b>Id: </b></th>\n <td style=\"padding-left: 4px;\">CMS506FHIRSafeUseofOpioids</td>\n </tr>\n \n\n \n <tr>\n <th scope=\"row\"><b>Version: </b></th>\n <td style=\"padding-left: 4px;\">Draft based on 0.2.001</td>\n </tr>\n \n\n \n <tr>\n <th scope=\"row\"><b>Url: </b></th>\n <td style=\"padding-left: 4px;\"><a href=\"Measure-CMS506FHIRSafeUseofOpioids.html\">Safe Use of Opioids Concurrent PrescribingFHIR</a></td>\n </tr>\n \n\n \n <tr>\n <th scope=\"row\">\n <b>\n \n \n Short Name Identifier:\n \n \n </b>\n </th>\n\n <td style=\"padding-left: 4px;\">\n \n <p style=\"margin-bottom: 5px;\">\n <span>CMS506FHIR </span>\n </p>\n \n </td>\n </tr>\n \n <tr>\n <th scope=\"row\">\n <b>\n \n \n Version Independent Identifier:\n \n \n </b>\n </th>\n\n <td style=\"padding-left: 4px;\">\n \n <p style=\"margin-bottom: 5px;\">\n <span>urn:uuid:95d529af-66b4-4cfd-bc1f-f43704dc47ad</span>\n </p>\n \n </td>\n </tr>\n \n <tr>\n <th scope=\"row\">\n <b>\n \n \n Version Specific Identifier:\n \n \n </b>\n </th>\n\n <td style=\"padding-left: 4px;\">\n \n <p style=\"margin-bottom: 5px;\">\n <span>urn:uuid:c8f62fe1-8d6d-4e05-9574-7f89899e4ec7</span>\n </p>\n \n </td>\n </tr>\n \n <tr>\n <th scope=\"row\">\n <b>\n \n \n Endorser (CMS Consensus Based Entity) Identifier:\n \n \n </b>\n </th>\n\n <td style=\"padding-left: 4px;\">\n \n <p style=\"margin-bottom: 5px;\">\n <span>3316e</span>\n </p>\n \n </td>\n </tr>\n \n <tr>\n <th scope=\"row\">\n <b>\n \n \n Publisher (CMS) Identifier:\n \n \n </b>\n </th>\n\n <td style=\"padding-left: 4px;\">\n \n <p style=\"margin-bottom: 5px;\">\n <span>506FHIR</span>\n </p>\n \n </td>\n </tr>\n \n\n \n <tr>\n <th scope=\"row\"><b>Effective Period: </b></th>\n <td style=\"padding-left: 4px;\">2026-01-01..2026-12-31</td>\n </tr>\n \n\n \n <tr>\n <th scope=\"row\"><b>Status: </b></th>\n <td style=\"padding-left: 4px;\">draft</td>\n </tr>\n \n\n \n\n \n <tr>\n <th scope=\"row\"><b>Publisher: </b></th>\n <td style=\"padding-left: 4px;\">Centers for Medicare &amp; Medicaid Services (CMS)</td>\n </tr>\n \n\n \n <tr>\n <th scope=\"row\"><b>Author: </b></th>\n <td style=\"padding-left: 4px;\">Mathematica</td>\n </tr>\n \n\n \n\n \n <tr>\n <th scope=\"row\"><b>Description: </b></th>\n <td style=\"padding-left: 4px;\"><div><p>Proportion of inpatient hospitalizations for patients 18 years of age and older prescribed, or continued on, two or more opioids or an opioid and benzodiazepine concurrently at discharge</p>\n</div></td>\n </tr>\n \n\n \n\n \n\n \n\n \n\n \n\n \n <tr>\n <th scope=\"row\"><b>Purpose: </b></th>\n <td style=\"padding-left: 4px;\"><div><p>UNKNOWN</p>\n</div></td>\n </tr>\n \n\n \n <tr>\n <th scope=\"row\"><b>Copyright: </b></th>\n <td style=\"padding-left: 4px;\"><div><p>Limited proprietary coding is contained in the Measure specifications for user convenience. Users of proprietary code sets should obtain all necessary licenses from the owners of the code sets. Mathematica disclaims all liability for use or accuracy of any third-party codes contained in the specifications.</p>\n<p>CPT(R) contained in the measure specifications is copyright 2004-2024 American Medical Association. LOINC(R) copyright 2004-2024 Regenstrief Institute, Inc. This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2024 International Health Terminology Standards Development Organisation. ICD-10 copyright 2024 World Health Organization. All Rights Reserved.</p>\n</div></td>\n </tr>\n \n\n \n <tr>\n <th scope=\"row\"><b>Disclaimer: </b></th>\n <td style=\"padding-left: 4px;\"><div><p>These performance measures are not clinical guidelines, do not establish a standard of medical care, and have not been tested for all potential applications.</p>\n<p>THE MEASURES AND SPECIFICATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND.</p>\n<p>Due to technical limitations, registered trademarks are indicated by (R) or [R] and unregistered trademarks are indicated by (TM) or [TM].</p>\n</div></td>\n </tr>\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n <tr>\n <th scope=\"row\"><b>Rationale: </b></th>\n <td style=\"padding-left: 4px;\"><div><p>Unintentional opioid overdose fatalities have become a major public health concern in the United States (Rudd, Aleshire, Zibbel, &amp; Gladden, 2016). Reducing the number of unintentional overdoses has become a priority for numerous federal organizations including, but not limited to, the Centers for Disease Control and Prevention (CDC), the Federal Interagency Workgroup for Opioid Adverse Drug Events, and the Substance Abuse and Mental Health Services Administration.</p>\n<p>Concurrent prescriptions of opioids or opioids and benzodiazepines places patients at a greater risk of unintentional overdose due to the increased risk of respiratory depression (Dowell, Haegerich, &amp; Chou, 2016; Dowell, Ragan, Jones, Baldwin, &amp; Chou, 2022). An analysis of national prescribing patterns shows that more than half of patients who received an opioid prescription in 2009 had filled another opioid prescription within the previous 30 days (National Institute on Drug Abuse, 2011). Studies of multiple claims and prescription databases have shown that between 5%-15% of patients receive concurrent opioid prescriptions and 5%-20% of patients receive concurrent opioid and benzodiazepine prescriptions across various settings (Liu et al., 2013; Mack et al., 2015, Park et al., 2015). Patients who have multiple opioid prescriptions have an increased risk for overdose (Jena et al., 2014). Rates of fatal overdose are ten times higher in patients who are co-dispensed opioid analgesics and benzodiazepines than opioids alone (Dasgupta et al., 2015). The number of opioid overdose deaths involving benzodiazepines increased 14% on average each year from 2006 to 2011, while the number of opioid analgesic overdose deaths not involving benzodiazepines did not change significantly (Jones &amp; McAninch, 2015). Furthermore, concurrent use of benzodiazepines with opioids was prevalent in 31%-51% of fatal overdoses (Dowell, Haegerich, &amp; Chou, 2016). One study found that eliminating concurrent use of opioids and benzodiazepines could reduce the risk of opioid overdose-related emergency department (ED) and inpatient visits by 15% and potentially could have prevented an estimated 2,630 deaths related to opioid painkiller overdoses in 2015 (Sun, Dixit, Humphreys, Darnall, &amp; Mackey, 2017).</p>\n<p>A study on The Opioid Safety Initiative in the Veterans Health Administration (VHA), which includes an opioid and benzodiazepine concurrent prescribing measure that this measure is based on, was associated with a decrease of 20.67% overall and 0.86% patients per month (781 patients per month) receiving concurrent benzodiazepine with an opioid among all adult VHA patients who filled outpatient opioid prescriptions from October 2012 to September 2014 (Lin, Bohnert, Kerns, Clay, Ganoczy, &amp; Ilgen, 2017).</p>\n<p>Adopting a measure that calculates the proportion of patients with two or more opioids or opioids and benzodiazepines concurrently has the potential to reduce preventable mortality and reduce the costs associated with adverse events related to opioid use by (1) encouraging providers to identify patients with concurrent prescriptions of opioids or opioids and benzodiazepines and (2) discouraging providers from prescribing two or more opioids or opioids and benzodiazepines concurrently.</p>\n</div></td>\n </tr>\n \n\n \n <tr>\n <th scope=\"row\"><b>Clinical recommendation statement: </b></th>\n <td style=\"padding-left: 4px;\"><div><p>The CDC Clinical Practice Guideline for Prescribing Opioids for Pain — United States, 2022 recommends that clinicians should:</p>\n<ul>\n<li>“[Use strategies minimizing] opioid use…for both opioid-naïve and opioid-tolerant patients with acute pain when possible. If patients receiving long-term opioid therapy require additional medication for acute pain, nonopioid medications should be used when possible.”</li>\n<li>”Use particular caution when prescribing opioid pain medication and benzodiazepines concurrently.&quot;</li>\n<li>“Review increased risks for respiratory depression when opioids are taken with benzodiazepines, other sedatives, alcohol, nonprescribed or illicit drugs (e.g., heroin), or other opioids (see Recommendations 8 and 11)”</li>\n<li>“Closely monitor patients who are unable to taper and who continue on high-dose or otherwise high-risk opioid regimens (e.g., opioids prescribed concurrently with benzodiazepines) and should work with patients to mitigate overdose risk (e.g., by providing overdose education and naloxone) (see Recommendation 8).”</li>\n<li>&quot;Discuss information from the PDMP with the patient and confirm that the patient is aware of any additional prescriptions.”</li>\n<li>“Discuss safety concerns, including increased risk for respiratory depression and overdose, with patients found to be receiving overlapping prescription opioids from multiple clinicians who are not coordinating the patient’s care or patients who are receiving medications that increase risk when combined with opioids (e.g., benzodiazepines) (see Recommendation 11), and offer naloxone (see Recommendation 8).&quot;</li>\n<li>&quot;Discuss safety concerns with other clinicians who are prescribing controlled substances for the patient. Ideally, clinicians should first discuss concerns with the patient and inform them that they plan to coordinate care with their other clinicians to improve the patient’s safety.”</li>\n</ul>\n<p>In addition to the 2022 CDC Clinical Practice Guideline for Prescribing Opioids for Pain, opioid prescribing guidelines issued by various state agencies and professional societies for various settings agree with the recommendation to avoid concurrently prescribing opioids (American Academy of Emergency Medicine (AAEM), 2013; and Washington Agency Medical Directors’ Group (WAMDG), 2015), and opioids and benzodiazepines (WAMDG, 2015; American Society of Interventional Pain Physicians (ASIPP), 2012;, and New York City Department Of Health and Mental Hygiene (NYC DPOMH), 2013) whenever possible as the combination of these medications may potentiate opioid-induced respiratory depression.</p>\n</div></td>\n </tr>\n \n\n \n\n \n <tr>\n <th scope=\"row\"><b>Guidance (Usage): </b></th>\n <td style=\"padding-left: 4px;\">Clinician judgement, clinical appropriateness, or both may indicate concurrent prescribing of two unique opioids or an opioid and benzodiazepine is medically necessary, thus the measure is not expected to have a zero rate. \n\nInpatient hospitalizations with discharge medications of an opioid or benzodiazepine prescription should be included in the initial population. \n\nInpatient hospitalizations with discharge medications of two or more opioids or an opioid and benzodiazepine resulting in concurrent therapy at discharge should be included in the numerator. Each benzodiazepine and opioid included on the medication discharge list is considered a unique prescription.\n\nThe denominator population includes patients with inpatient hospitalizations and patients from Acute Hospital Care at Home programs, who are treated and billed as inpatients but receive care in their home.\n\nThis eCQM is an episode-based measure. An episode is defined as each inpatient hospitalization or encounter that ends during the measurement period. \n\nThis FHIR-based measure has been derived from the QDM-based measure: CMS 506v8.0. Please refer to the HL7 QI-Core Implementation Guide (https://hl7.org/fhir/us/qicore/STU4.1.1/) for more information on QI-Core and mapping recommendations from QDM to QI-Core 4.1.1 (https://hl7.org/fhir/us/qicore/STU4.1.1/qdm-to-qicore.html).</td>\n </tr>\n \n\n \n \n <tr>\n <th scope=\"row\"><b>Population Criteria: </b></th>\n <td style=\"padding-left: 4px;\">\n \n <table class=\"grid-dict\">\n \n <tr>\n <th><b>67460a2f46b6174510cfea5f</b></th>\n </tr>\n \n \n <tr>\n <td>Initial Population:</td>\n\n \n \n <td>Inpatient hospitalizations that end during the measurement period, where the patient is 18 years of age and older at the start of the encounter and prescribed one opioid and/or benzodiazepine at discharge</td>\n \n \n\n </tr>\n \n <tr>\n <td>Denominator:</td>\n\n \n \n <td>Equals Initial Population</td>\n \n \n\n </tr>\n \n <tr>\n <td>Denominator Exclusion:</td>\n\n \n \n <td>Inpatient hospitalizations where patients have cancer pain that begins prior to or during the encounter or are ordered or are receiving palliative or hospice care (including comfort measures, terminal care, and dying care) during the hospitalization or in an emergency department encounter or observation stay immediately prior to hospitalization, patients receiving medication for opioid use disorder (OUD) with active OUD diagnosis or Opioid Medication Assisted Treatment (MAT), patients with sickle cell disease, patients discharged to another inpatient care facility or left against medical advice, and patients who expire during the inpatient stay</td>\n \n \n\n </tr>\n \n <tr>\n <td>Numerator:</td>\n\n \n \n <td>Inpatient hospitalizations where the patient is prescribed two or more opioids or an opioid and benzodiazepine at discharge</td>\n \n \n\n </tr>\n \n \n </table>\n \n </td>\n </tr>\n \n \n\n \n <tr>\n <th scope=\"row\"><b> Supplemental Data Elements: </b></th>\n <td style=\"padding-left: 4px;\">\n \n \n \n <p>SDE Ethnicity</p>\n \n \n \n \n \n <p>SDE Payer</p>\n \n \n \n \n \n <p>SDE Race</p>\n \n \n \n \n \n <p>SDE Sex</p>\n \n \n \n </td>\n </tr>\n \n\n \n\n \n <tr>\n <th scope=\"row\">\n <b> Supplemental Data Guidance\n : </b></th>\n <td style=\"padding-left: 4px;\"> For every patient evaluated by this measure also identify payer, race, ethnicity and sex; \nSDE Ethnicity \nSDE Payer \nSDE Race \nSDE Sex \n </td>\n </tr>\n \n\n \n <tr>\n <th scope=\"row\"><b>Libraries: </b></th>\n <td style=\"padding-left: 4px;\">\n <table class=\"grid-dict\">\n \n <tr>\n <td><a href=\"Library-CMS506FHIRSafeUseofOpioids.html\">CMS506FHIRSafeUseofOpioids</a></td>\n </tr>\n \n </table>\n </td>\n </tr>\n \n\n \n\n \n \n <tr>\n <th scope=\"row\"><b>Terminology and Other Dependencies: </b></th>\n <td style=\"padding-left: 4px;\">\n \n <li><code>Library/SupplementalDataElements|3.5.000</code></li>\n \n <li><code>Library/CQMCommon|2.2.000</code></li>\n \n <li><code>Library/FHIRHelpers|4.4.000</code></li>\n \n <li><code>Library/QICoreCommon|2.1.000</code></li>\n \n <li><a href=\"http://hl7.org/fhir/R4/codesystem-administrative-gender.html\">AdministrativeGender</a></li>\n \n <li><a href=\"http://terminology.hl7.org/5.5.0/CodeSystem-medicationrequest-category.html\">MedicationRequest Category Codes</a></li>\n \n <li><a href=\"http://terminology.hl7.org/5.5.0/CodeSystem-condition-category.html\">Condition Category Codes</a></li>\n \n <li><a href=\"http://hl7.org/fhir/us/core/STU3.1.1/CodeSystem-condition-category.html\">US Core Condition Category Extension Codes</a></li>\n \n <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.666.5.307/expansion\">Encounter Inpatient</a></li>\n \n <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1046.241/expansion\">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.241</a></li>\n \n <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1125.1/expansion\">Schedule IV Benzodiazepines</a></li>\n \n <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.114222.4.11.3591/expansion\">Payer</a></li>\n \n <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1111.180/expansion\">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.180</a></li>\n \n <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1111.175/expansion\">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.175</a></li>\n \n <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1046.269/expansion\">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.269</a></li>\n \n <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1111.177/expansion\">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.177</a></li>\n \n <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1111.171/expansion\">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.171</a></li>\n \n <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.600.1.1579/expansion\">Palliative or Hospice Care</a></li>\n \n <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1111.143/expansion\">Observation Services</a></li>\n \n <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.292/expansion\">Emergency Department Visit</a></li>\n \n <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.87/expansion\">Discharge To Acute Care Facility</a></li>\n \n <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1116.365/expansion\">Hospice Care Referral or Admission</a></li>\n \n <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.309/expansion\">Patient Expired</a></li>\n \n <li><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.308/expansion\">Left Against Medical Advice</a></li>\n \n </td>\n </tr>\n <tr>\n <th scope=\"row\"><b>Parameters:</b></th>\n <td style=\"padding-left: 4px;\">\n <table class=\"grid-dict\">\n <tr>\n <th><b>name</b></th>\n <th><b>use</b></th>\n <th><b>min</b></th>\n <th><b>max</b></th>\n <th><b>type</b></th>\n </tr>\n \n <tr>\n <td>Measurement Period</td>\n <td>In</td>\n <td>0</td>\n <td>1</td>\n <td>Period</td>\n </tr>\n \n <tr>\n <td>SDE Sex</td>\n <td>Out</td>\n <td>0</td>\n <td>1</td>\n <td>Coding</td>\n </tr>\n \n <tr>\n <td>Numerator</td>\n <td>Out</td>\n <td>0</td>\n <td>*</td>\n <td>Resource</td>\n </tr>\n \n <tr>\n <td>Denominator</td>\n <td>Out</td>\n <td>0</td>\n <td>*</td>\n <td>Resource</td>\n </tr>\n \n <tr>\n <td>SDE Payer</td>\n <td>Out</td>\n <td>0</td>\n <td>*</td>\n <td>Resource</td>\n </tr>\n \n <tr>\n <td>Initial Population</td>\n <td>Out</td>\n <td>0</td>\n <td>*</td>\n <td>Resource</td>\n </tr>\n \n <tr>\n <td>SDE Ethnicity</td>\n <td>Out</td>\n <td>0</td>\n <td>1</td>\n <td>Resource</td>\n </tr>\n \n <tr>\n <td>Denominator Exclusion</td>\n <td>Out</td>\n <td>0</td>\n <td>*</td>\n <td>Resource</td>\n </tr>\n \n <tr>\n <td>SDE Race</td>\n <td>Out</td>\n <td>0</td>\n <td>1</td>\n <td>Resource</td>\n </tr>\n \n </table>\n </td>\n </tr>\n\n <tr>\n <th scope=\"row\"><b>DataRequirements:</b></th>\n <td style=\"padding-left: 4px;\">\n <table class=\"grid-dict\">\n <tr>\n <th><b>Resource Type</b></th>\n <th><b>Resource Elements</b></th>\n <th><b>Valueset Name</b></th>\n <th><b>Valueset</b></th>\n </tr>\n \n <tr>\n <td>Patient(<a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-patient.html\">QICorePatient</a>)</td>\n <td>\n \n ethnicity\n \n race\n \n </td>\n <td>\n \n </td>\n <td/>\n </tr>\n \n <tr>\n <td>Encounter(<a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-encounter.html\">QICoreEncounter</a>)</td>\n <td>\n \n type\n \n status\n \n status.value\n \n period\n \n condition\n \n condition.reference\n \n condition.reference.value\n \n hospitalization\n \n hospitalization.dischargeDisposition\n \n </td>\n <td>\n \n \n Encounter Inpatient\n \n \n </td>\n <td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.666.5.307/expansion\">Encounter Inpatient</a></td>\n </tr>\n \n <tr>\n <td>Encounter(<a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-encounter.html\">QICoreEncounter</a>)</td>\n <td>\n \n type\n \n status\n \n status.value\n \n period\n \n condition\n \n condition.reference\n \n condition.reference.value\n \n hospitalization\n \n hospitalization.dischargeDisposition\n \n </td>\n <td>\n \n \n Observation Services\n \n \n </td>\n <td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1111.143/expansion\">Observation Services</a></td>\n </tr>\n \n <tr>\n <td>Encounter(<a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-encounter.html\">QICoreEncounter</a>)</td>\n <td>\n \n type\n \n status\n \n status.value\n \n period\n \n condition\n \n condition.reference\n \n condition.reference.value\n \n hospitalization\n \n hospitalization.dischargeDisposition\n \n </td>\n <td>\n \n \n Emergency Department Visit\n \n \n </td>\n <td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.117.1.7.1.292/expansion\">Emergency Department Visit</a></td>\n </tr>\n \n <tr>\n <td>Medication(<a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-medication.html\">QICoreMedication</a>)</td>\n <td>\n \n id\n \n </td>\n <td>\n \n </td>\n <td/>\n </tr>\n \n <tr>\n <td>Medication(<a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-medication.html\">QICoreMedication</a>)</td>\n <td>\n \n id\n \n </td>\n <td>\n \n </td>\n <td/>\n </tr>\n \n <tr>\n <td>Medication(<a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-medication.html\">QICoreMedication</a>)</td>\n <td>\n \n id\n \n </td>\n <td>\n \n </td>\n <td/>\n </tr>\n \n <tr>\n <td>MedicationRequest(<a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-medicationrequest.html\">QICoreMedicationRequest</a>)</td>\n <td>\n \n medication\n \n status\n \n status.value\n \n intent\n \n intent.value\n \n authoredOn\n \n authoredOn.value\n \n </td>\n <td>\n \n \n Schedule II, III and IV Opioid Medications\n \n \n </td>\n <td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1046.241/expansion\">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.241</a></td>\n </tr>\n \n <tr>\n <td>MedicationRequest(<a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-medicationrequest.html\">QICoreMedicationRequest</a>)</td>\n <td>\n \n medication\n \n status\n \n status.value\n \n intent\n \n intent.value\n \n authoredOn\n \n authoredOn.value\n \n </td>\n <td>\n \n \n Schedule IV Benzodiazepines\n \n \n </td>\n <td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1125.1/expansion\">Schedule IV Benzodiazepines</a></td>\n </tr>\n \n <tr>\n <td>MedicationRequest(<a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-medicationrequest.html\">QICoreMedicationRequest</a>)</td>\n <td>\n \n medication\n \n status\n \n status.value\n \n intent\n \n intent.value\n \n authoredOn\n \n authoredOn.value\n \n </td>\n <td>\n \n \n Schedule IV Benzodiazepines\n \n \n </td>\n <td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1125.1/expansion\">Schedule IV Benzodiazepines</a></td>\n </tr>\n \n <tr>\n <td>MedicationRequest(<a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-medicationrequest.html\">QICoreMedicationRequest</a>)</td>\n <td>\n \n medication.reference\n \n status\n \n status.value\n \n intent\n \n intent.value\n \n authoredOn\n \n authoredOn.value\n \n medication\n \n </td>\n <td>\n \n </td>\n <td/>\n </tr>\n \n <tr>\n <td>MedicationRequest(<a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-medicationrequest.html\">QICoreMedicationRequest</a>)</td>\n <td>\n \n medication\n \n status\n \n status.value\n \n intent\n \n intent.value\n \n authoredOn\n \n authoredOn.value\n \n </td>\n <td>\n \n \n Medications for Opioid Use Disorder (MOUD)\n \n \n </td>\n <td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1046.269/expansion\">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.269</a></td>\n </tr>\n \n <tr>\n <td>Coverage(<a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-coverage.html\">QICoreCoverage</a>)</td>\n <td>\n \n type\n \n period\n \n </td>\n <td>\n \n \n Payer Type\n \n \n </td>\n <td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.114222.4.11.3591/expansion\">Payer</a></td>\n </tr>\n \n <tr>\n <td>Condition(<a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-condition.html\">QICoreCondition</a>)</td>\n <td>\n \n id\n \n id.value\n \n code\n \n </td>\n <td>\n \n </td>\n <td/>\n </tr>\n \n <tr>\n <td>Condition(<a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-condition.html\">QICoreCondition</a>)</td>\n <td>\n \n code\n \n </td>\n <td>\n \n \n Opioid Use Disorder\n \n \n </td>\n <td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1111.171/expansion\">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.171</a></td>\n </tr>\n \n <tr>\n <td>Condition(<a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-condition.html\">QICoreCondition</a>)</td>\n <td>\n \n code\n \n </td>\n <td>\n \n \n Cancer Related Pain\n \n \n </td>\n <td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1111.180/expansion\">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.180</a></td>\n </tr>\n \n <tr>\n <td>Condition(<a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-condition.html\">QICoreCondition</a>)</td>\n <td>\n \n code\n \n </td>\n <td>\n \n \n Sickle Cell Disease with and without Crisis\n \n \n </td>\n <td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1111.175/expansion\">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.175</a></td>\n </tr>\n \n <tr>\n <td>Procedure(<a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-procedure.html\">QICoreProcedure</a>)</td>\n <td>\n \n code\n \n performed\n \n </td>\n <td>\n \n \n Opioid Medication Assisted Treatment (MAT)\n \n \n </td>\n <td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113762.1.4.1111.177/expansion\">http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.177</a></td>\n </tr>\n \n <tr>\n <td>Procedure(<a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-procedure.html\">QICoreProcedure</a>)</td>\n <td>\n \n code\n \n </td>\n <td>\n \n \n Palliative or Hospice Care\n \n \n </td>\n <td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.600.1.1579/expansion\">Palliative or Hospice Care</a></td>\n </tr>\n \n <tr>\n <td>ServiceRequest(<a href=\"http://hl7.org/fhir/us/qicore/STU4.1.1/StructureDefinition-qicore-servicerequest.html\">QICoreServiceRequest</a>)</td>\n <td>\n \n code\n \n </td>\n <td>\n \n \n Palliative or Hospice Care\n \n \n </td>\n <td><a href=\"https://vsac.nlm.nih.gov/valueset/2.16.840.1.113883.3.600.1.1579/expansion\">Palliative or Hospice Care</a></td>\n </tr>\n \n </table>\n </td>\n </tr>\n\n \n <tr>\n <th scope=\"row\"><b>Direct Reference Codes:</b></th>\n <td style=\"padding-left: 4px;\">\n <table class=\"grid-dict\">\n <tr>\n <th><b>display</b></th>\n <th><b>code</b></th>\n <th><b>system</b></th>\n </tr>\n \n <tr>\n <td>Male</td>\n <td>M</td>\n <td><a href=\"http://hl7.org/fhir/R4/codesystem-administrative-gender.html\">http://hl7.org/fhir/administrative-gender</a></td>\n </tr>\n \n <tr>\n <td>Female</td>\n <td>F</td>\n <td><a href=\"http://hl7.org/fhir/R4/codesystem-administrative-gender.html\">http://hl7.org/fhir/administrative-gender</a></td>\n </tr>\n \n <tr>\n <td>Community</td>\n <td>community</td>\n <td><a href=\"http://terminology.hl7.org/5.5.0/CodeSystem-medicationrequest-category.html\">http://terminology.hl7.org/CodeSystem/medicationrequest-category</a></td>\n </tr>\n \n <tr>\n <td>Discharge</td>\n <td>discharge</td>\n <td><a href=\"http://terminology.hl7.org/5.5.0/CodeSystem-medicationrequest-category.html\">http://terminology.hl7.org/CodeSystem/medicationrequest-category</a></td>\n </tr>\n \n <tr>\n <td>Problem List Item</td>\n <td>problem-list-item</td>\n <td><a href=\"http://terminology.hl7.org/5.5.0/CodeSystem-condition-category.html\">http://terminology.hl7.org/CodeSystem/condition-category</a></td>\n </tr>\n \n <tr>\n <td>Health Concern</td>\n <td>health-concern</td>\n <td><a href=\"http://hl7.org/fhir/us/core/STU3.1.1/CodeSystem-condition-category.html\">http://hl7.org/fhir/us/core/CodeSystem/condition-category</a></td>\n </tr>\n \n </table>\n </td>\n </tr>\n \n\n \n <tr>\n <th scope=\"row\"><b>Logic Definitions:</b></th>\n <td style=\"padding-left: 4px;\">\n \n <table class=\"grid-dict\">\n <tr>\n <th><b>Group</b></th>\n <th><b>Scoring</b></th>\n <th><b>Population Criteria</b></th>\n <th><b>Expression</b></th>\n </tr>\n <tr>\n \n <td> 67460a2f46b6174510cfea5f </td>\n <td colspan=\"3\" style=\"padding-left: 4px;\">\n \n <b>Group scoring:</b>\n \n <span> proportion </span>\n \n \n\n \n\n \n\n \n\n \n <tr>\n \n <th scope=\"row\"><b>Type: </b></th>\n <td style=\"padding-left: 4px;\">\n \n \n <p style=\"margin-bottom: 5px;\">\n <span>Process </span>\n </p>\n \n \n \n </td>\n \n </tr>\n \n\n \n\n \n <tr>\n <th scope=\"row\"><b>Rate Aggregation: </b></th>\n <td colspan=\"3\" style=\"padding-left: 4px;\">None</td>\n </tr>\n \n\n \n <tr>\n <th scope=\"row\"><b>Improvement Notation: </b></th>\n <td style=\"padding-left: 4px;\">\n \n \n \n <p style=\"margin-bottom: 5px;\">\n <span>Decreased score indicates improvement </span>\n </p>\n \n \n \n \n </td>\n </tr>\n \n\n \n\n </td>\n \n <tr>\n <td/>\n <td/>\n <td>Initial Population</td>\n <td>\n \n <pre><code class=\"language-cql\">define &quot;Initial Population&quot;:\n &quot;Inpatient Encounters with an Opioid or Benzodiazepine at Discharge&quot;</code></pre>\n \n </td>\n </tr>\n \n <tr>\n <td/>\n <td/>\n <td>Denominator</td>\n <td>\n \n <pre><code class=\"language-cql\">define &quot;Denominator&quot;:\n &quot;Initial Population&quot;</code></pre>\n \n </td>\n </tr>\n \n <tr>\n <td/>\n <td/>\n <td>Denominator Exclusion</td>\n <td>\n \n <pre><code class=\"language-cql\">define &quot;Denominator Exclusion&quot;:\n /*Excludes encounters of patients with cancer pain or who are receiving palliative or hospice care at the time of the encounter or who receive treatment for opioid use disorder, have sickle cell disease, or who are discharged to another inpatient care facility or discharged against medical advice, or expire during the inpatient stay*/\n \n ( &quot;Inpatient Encounters with an Opioid or Benzodiazepine at Discharge&quot; InpatientEncounter\n where exists ( [&quot;Condition&quot;: &quot;Cancer Related Pain&quot;] CancerPain\n where ( CancerPain.isProblemListItem ( )\n or CancerPain.isHealthConcern ( )\n )\n and CancerPain.prevalenceInterval ( ) overlaps day of InpatientEncounter.period\n )\n or exists ( ( InpatientEncounter.encounterDiagnosis ( ) ) InpatientEncounterDiagnosis\n where InpatientEncounterDiagnosis.code in &quot;Cancer Related Pain&quot;\n )\n or exists ( [&quot;Condition&quot;: &quot;Sickle Cell Disease with and without Crisis&quot;] SickleCellDisease\n where SickleCellDisease.prevalenceInterval ( ) overlaps day of InpatientEncounter.period\n )\n or exists ( &quot;Treatment for Opioid Use Disorders&quot; OUDTreatment\n where OUDTreatment.authoredOn during day of InpatientEncounter.period\n )\n or exists ( &quot;Intervention Palliative or Hospice Care&quot; PalliativeOrHospiceCare\n where Coalesce(start of PalliativeOrHospiceCare.performed.toInterval(), PalliativeOrHospiceCare.authoredOn) during day of InpatientEncounter.&quot;hospitalizationWithObservation&quot; ( )\n )\n or ( InpatientEncounter.hospitalization.dischargeDisposition in &quot;Discharge To Acute Care Facility&quot;\n or InpatientEncounter.hospitalization.dischargeDisposition in &quot;Hospice Care Referral or Admission&quot;\n or InpatientEncounter.hospitalization.dischargeDisposition in &quot;Patient Expired&quot;\n or InpatientEncounter.hospitalization.dischargeDisposition in &quot;Left Against Medical Advice&quot;\n )\n )</code></pre>\n \n </td>\n </tr>\n \n <tr>\n <td/>\n <td/>\n <td>Numerator</td>\n <td>\n \n <pre><code class=\"language-cql\">define &quot;Numerator&quot;:\n /*Encounters of patients prescribed two or more opioids or an opioid and benzodiazepine at discharge.*/\n \n ( ( &quot;Inpatient Encounters with an Opioid or Benzodiazepine at Discharge&quot; InpatientEncounter\n where ( Count(&quot;Opioid at Discharge&quot; OpioidMedications\n where OpioidMedications.authoredOn during day of InpatientEncounter.period\n return distinct OpioidMedications.medication\n ) &gt;= 2\n )\n or exists ( &quot;Opioid at Discharge&quot; OpioidDischargeMedications\n where OpioidDischargeMedications.authoredOn during day of InpatientEncounter.period\n and exists &quot;Benzodiazepine at Discharge&quot; BenzodiazepineDischargeMedication\n where BenzodiazepineDischargeMedication.authoredOn during day of InpatientEncounter.period\n )\n )\n )</code></pre>\n \n </td>\n </tr>\n \n \n \n </tr>\n </table>\n \n\n <table class=\"grid-dict\">\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>SupplementalDataElements</td>\n \n \n <td>SDE Sex</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">define &quot;SDE Sex&quot;:\n case\n when Patient.gender = 'male' then &quot;M&quot;\n when Patient.gender = 'female' then &quot;F&quot;\n else null\n end</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS506FHIRSafeUseofOpioids</td>\n \n \n <td>SDE Sex</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">define &quot;SDE Sex&quot;:\n SDE.&quot;SDE Sex&quot;</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CQMCommon</td>\n \n \n <td>Inpatient Encounter</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">define &quot;Inpatient Encounter&quot;:\n [Encounter: &quot;Encounter Inpatient&quot;] EncounterInpatient\n\t\twhere EncounterInpatient.status = 'finished'\n\t\tand EncounterInpatient.period ends during day of &quot;Measurement Period&quot;</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS506FHIRSafeUseofOpioids</td>\n \n \n <td>Inpatient Encounter with Age Greater than or Equal to 18</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">define &quot;Inpatient Encounter with Age Greater than or Equal to 18&quot;:\n CQMCommon.&quot;Inpatient Encounter&quot; InpatientHospitalEncounter\n where AgeInYearsAt(date from start of InpatientHospitalEncounter.period) &gt;= 18</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS506FHIRSafeUseofOpioids</td>\n \n \n <td>Opioid at Discharge</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">define &quot;Opioid at Discharge&quot;:\n ( [&quot;MedicationRequest&quot;: &quot;Schedule II, III and IV Opioid Medications&quot;] OpioidMedications\n where ( OpioidMedications.isCommunity ( )\n or OpioidMedications.isDischarge ( )\n ) ) OpioidDischargeMedication\n where OpioidDischargeMedication.status in { 'active', 'completed' }\n and OpioidDischargeMedication.intent = 'order'</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS506FHIRSafeUseofOpioids</td>\n \n \n <td>Benzodiazepine at Discharge</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">define &quot;Benzodiazepine at Discharge&quot;:\n ( [&quot;MedicationRequest&quot;: medication in &quot;Schedule IV Benzodiazepines&quot;] BenzoMedications\n where ( BenzoMedications.isCommunity ( )\n or BenzoMedications.isDischarge ( )\n ) ) BenzodiazepineDischargeMedication\n where BenzodiazepineDischargeMedication.status in { 'active', 'completed' }\n and BenzodiazepineDischargeMedication.intent = 'order'</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS506FHIRSafeUseofOpioids</td>\n \n \n <td>Inpatient Encounters with an Opioid or Benzodiazepine at Discharge</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">define &quot;Inpatient Encounters with an Opioid or Benzodiazepine at Discharge&quot;:\n/*Captures encounters of patients with an opioid and/or benzodiazepine at discharge*/\n \n &quot;Inpatient Encounter with Age Greater than or Equal to 18&quot; InpatientEncounter\n with ( &quot;Opioid at Discharge&quot;\n union &quot;Benzodiazepine at Discharge&quot; ) OpioidOrBenzodiazepineAtDischarge\n such that OpioidOrBenzodiazepineAtDischarge.authoredOn during day of InpatientEncounter.period</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS506FHIRSafeUseofOpioids</td>\n \n \n <td>Numerator</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">define &quot;Numerator&quot;:\n /*Encounters of patients prescribed two or more opioids or an opioid and benzodiazepine at discharge.*/\n \n ( ( &quot;Inpatient Encounters with an Opioid or Benzodiazepine at Discharge&quot; InpatientEncounter\n where ( Count(&quot;Opioid at Discharge&quot; OpioidMedications\n where OpioidMedications.authoredOn during day of InpatientEncounter.period\n return distinct OpioidMedications.medication\n ) &gt;= 2\n )\n or exists ( &quot;Opioid at Discharge&quot; OpioidDischargeMedications\n where OpioidDischargeMedications.authoredOn during day of InpatientEncounter.period\n and exists &quot;Benzodiazepine at Discharge&quot; BenzodiazepineDischargeMedication\n where BenzodiazepineDischargeMedication.authoredOn during day of InpatientEncounter.period\n )\n )\n )</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS506FHIRSafeUseofOpioids</td>\n \n \n <td>Initial Population</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">define &quot;Initial Population&quot;:\n &quot;Inpatient Encounters with an Opioid or Benzodiazepine at Discharge&quot;</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS506FHIRSafeUseofOpioids</td>\n \n \n <td>Denominator</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">define &quot;Denominator&quot;:\n &quot;Initial Population&quot;</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>SupplementalDataElements</td>\n \n \n <td>SDE Payer</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">define &quot;SDE Payer&quot;:\n [Coverage: type in &quot;Payer Type&quot;] Payer\n return {\n code: Payer.type,\n period: Payer.period\n }</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS506FHIRSafeUseofOpioids</td>\n \n \n <td>SDE Payer</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">define &quot;SDE Payer&quot;:\n SDE.&quot;SDE Payer&quot;</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>SupplementalDataElements</td>\n \n \n <td>SDE Ethnicity</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">define &quot;SDE Ethnicity&quot;:\n Patient.ethnicity E\n return Tuple {\n codes: { E.ombCategory } union E.detailed,\n display: E.text\n }</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS506FHIRSafeUseofOpioids</td>\n \n \n <td>SDE Ethnicity</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">define &quot;SDE Ethnicity&quot;:\n SDE.&quot;SDE Ethnicity&quot;</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS506FHIRSafeUseofOpioids</td>\n \n \n <td>Treatment for Opioid Use Disorders</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">define &quot;Treatment for Opioid Use Disorders&quot;:\n ( [&quot;MedicationRequest&quot;: &quot;Medications for Opioid Use Disorder (MOUD)&quot;] MedicationTreatment\n with [&quot;Procedure&quot;: &quot;Opioid Medication Assisted Treatment (MAT)&quot;] MAT\n such that MedicationTreatment.authoredOn during day of MAT.performed.toInterval ( )\n and MedicationTreatment.authoredOn during day of &quot;Measurement Period&quot;\n )\n union ( [&quot;MedicationRequest&quot;: &quot;Medications for Opioid Use Disorder (MOUD)&quot;] MedicationTreatment\n with [&quot;Condition&quot;: &quot;Opioid Use Disorder&quot;] OUD\n such that MedicationTreatment.authoredOn during day of OUD.prevalenceInterval ( )\n and OUD.prevalenceInterval ( ) overlaps day of &quot;Measurement Period&quot;\n )</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS506FHIRSafeUseofOpioids</td>\n \n \n <td>Intervention Palliative or Hospice Care</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">define &quot;Intervention Palliative or Hospice Care&quot;:\n [&quot;ServiceRequest&quot;: &quot;Palliative or Hospice Care&quot;]\n union [&quot;Procedure&quot;: &quot;Palliative or Hospice Care&quot;]</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS506FHIRSafeUseofOpioids</td>\n \n \n <td>Denominator Exclusion</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">define &quot;Denominator Exclusion&quot;:\n /*Excludes encounters of patients with cancer pain or who are receiving palliative or hospice care at the time of the encounter or who receive treatment for opioid use disorder, have sickle cell disease, or who are discharged to another inpatient care facility or discharged against medical advice, or expire during the inpatient stay*/\n \n ( &quot;Inpatient Encounters with an Opioid or Benzodiazepine at Discharge&quot; InpatientEncounter\n where exists ( [&quot;Condition&quot;: &quot;Cancer Related Pain&quot;] CancerPain\n where ( CancerPain.isProblemListItem ( )\n or CancerPain.isHealthConcern ( )\n )\n and CancerPain.prevalenceInterval ( ) overlaps day of InpatientEncounter.period\n )\n or exists ( ( InpatientEncounter.encounterDiagnosis ( ) ) InpatientEncounterDiagnosis\n where InpatientEncounterDiagnosis.code in &quot;Cancer Related Pain&quot;\n )\n or exists ( [&quot;Condition&quot;: &quot;Sickle Cell Disease with and without Crisis&quot;] SickleCellDisease\n where SickleCellDisease.prevalenceInterval ( ) overlaps day of InpatientEncounter.period\n )\n or exists ( &quot;Treatment for Opioid Use Disorders&quot; OUDTreatment\n where OUDTreatment.authoredOn during day of InpatientEncounter.period\n )\n or exists ( &quot;Intervention Palliative or Hospice Care&quot; PalliativeOrHospiceCare\n where Coalesce(start of PalliativeOrHospiceCare.performed.toInterval(), PalliativeOrHospiceCare.authoredOn) during day of InpatientEncounter.&quot;hospitalizationWithObservation&quot; ( )\n )\n or ( InpatientEncounter.hospitalization.dischargeDisposition in &quot;Discharge To Acute Care Facility&quot;\n or InpatientEncounter.hospitalization.dischargeDisposition in &quot;Hospice Care Referral or Admission&quot;\n or InpatientEncounter.hospitalization.dischargeDisposition in &quot;Patient Expired&quot;\n or InpatientEncounter.hospitalization.dischargeDisposition in &quot;Left Against Medical Advice&quot;\n )\n )</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>SupplementalDataElements</td>\n \n \n <td>SDE Race</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">define &quot;SDE Race&quot;:\n Patient.race R\n return Tuple {\n codes: R.ombCategory union R.detailed,\n display: R.text\n }</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CMS506FHIRSafeUseofOpioids</td>\n \n \n <td>SDE Race</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">define &quot;SDE Race&quot;:\n SDE.&quot;SDE Race&quot;</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>QICoreCommon</td>\n \n \n <td>isCommunity</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">/*\n@description: Returns true if the given MedicationRequest has a category of Community\n*/\ndefine fluent function isCommunity(medicationRequest MedicationRequest):\n exists (medicationRequest.category C\n where C ~ Community\n )</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>FHIRHelpers</td>\n \n \n <td>ToConcept</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">/*\n@description: Converts the given FHIR [CodeableConcept](https://hl7.org/fhir/datatypes.html#CodeableConcept) value to a CQL Concept.\n*/\ndefine function ToConcept(concept FHIR.CodeableConcept):\n if concept is null then\n null\n else\n System.Concept {\n codes: concept.coding C return ToCode(C),\n display: concept.text.value\n }</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>QICoreCommon</td>\n \n \n <td>isDischarge</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">/*\n@description: Returns true if the given MedicationRequest has a category of Discharge\n*/\ndefine fluent function isDischarge(medicationRequest MedicationRequest):\n exists (medicationRequest.category C\n where C ~ Discharge\n )</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>FHIRHelpers</td>\n \n \n <td>ToString</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">define function ToString(value uri): value.value</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>FHIRHelpers</td>\n \n \n <td>ToCode</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">/*\n@description: Converts the given FHIR [Coding](https://hl7.org/fhir/datatypes.html#Coding) value to a CQL Code.\n*/\ndefine function ToCode(coding FHIR.Coding):\n if coding is null then\n null\n else\n System.Code {\n code: coding.code.value,\n system: coding.system.value,\n version: coding.version.value,\n display: coding.display.value\n }</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>QICoreCommon</td>\n \n \n <td>isProblemListItem</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">/*\n@description: Returns true if the given condition is a problem list item.\n*/\ndefine fluent function isProblemListItem(condition Condition):\n exists (condition.category C\n where C ~ &quot;problem-list-item&quot;\n )</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>QICoreCommon</td>\n \n \n <td>isHealthConcern</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">/*\n@description: Returns true if the given condition is a health concern\n*/\ndefine fluent function isHealthConcern(condition Condition):\n exists (condition.category C\n where C ~ &quot;health-concern&quot;\n )</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>QICoreCommon</td>\n \n \n <td>prevalenceInterval</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">/*\n@description: Returns an interval representing the normalized prevalence period of a given Condition.\n@comment: Uses the ToInterval and ToAbatementInterval functions to determine the widest potential interval from\nonset to abatement as specified in the given Condition. If the condition is active, or has an abatement date the resulting \ninterval will have a closed ending boundary. Otherwise, the resulting interval will have an open ending boundary.\n*/\ndefine fluent function prevalenceInterval(condition Condition):\nif condition.clinicalStatus ~ &quot;active&quot;\n or condition.clinicalStatus ~ &quot;recurrence&quot;\n or condition.clinicalStatus ~ &quot;relapse&quot; then\n Interval[start of condition.onset.toInterval(), end of condition.abatementInterval()]\nelse\n (end of condition.abatementInterval()) abatementDate\n return if abatementDate is null then\n Interval[start of condition.onset.toInterval(), abatementDate)\n else\n Interval[start of condition.onset.toInterval(), abatementDate]</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CQMCommon</td>\n \n \n <td>encounterDiagnosis</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">/*\n@description: Returns the Condition resources referenced by the diagnosis element of the Encounter\n*/\ndefine fluent function encounterDiagnosis(Encounter Encounter ):\n Encounter.diagnosis D\n return singleton from ([Condition] C where C.id = D.condition.reference.getId())</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>QICoreCommon</td>\n \n \n <td>getId</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">/*\n@description: Returns the tail of the given uri (i.e. everything after the last slash in the URI).\n@comment: This function can be used to determine the logical id of a given resource. It can be used in\na single-server environment to trace references. However, this function does not attempt to resolve\nor distinguish the base of the given url, and so cannot be used safely in multi-server environments.\n*/\ndefine fluent function getId(uri String):\n Last(Split(uri, '/'))</code></pre>\n </td>\n \n </tr>\n \n <tr>\n <th><b>Library Name</b></th>\n <th><b>Name</b></th>\n </tr>\n <tr>\n \n <td>CQMCommon</td>\n \n \n <td>hospitalizationWithObservation</td>\n \n </tr>\n <tr>\n \n <td/>\n <td>\n <pre class=\"highlight language-cql\"><code class=\"language-cql\">/*\n@description: Hospitalization with Observation returns the total interval from the start of any immediately prior emergency department visit through the observation visit to the discharge of the given encounter\n*/\ndefine fluent function hospitalizationWithObservation(TheEncounter Encounter ):\n TheEncounter Visit\n \t\tlet ObsVisit: Last([Encounter: &quot;Observation Services&quot;] LastObs\n \t\t\t\twhere LastObs.status = 'finished'\n and LastObs.period ends 1 hour or less on or before start of Visit.period\n \t\t\t\tsort by end of period\n \t\t\t),\n \t\t\tVisitStart: Coalesce(start of ObsVisit.period, start of Visit.period),\n \t\t\tEDVisit: Last([Encounter: &quot;Emergency Department Visit&quot;] LastED\n \t\t\t\twhere LastED.status = 'finished'\n and LastED.period ends 1 hour or less on or before VisitStart\n \t\t\t\tsort by end of period\n \t\t\t)\n \t\treturn Interval[Coalesce(start of EDVisit.period, VisitStart), end of Visit.period]</code></pre>\n </td>\n \n </tr>\n \n </table>\n </td>\n </tr>\n \n \n \n\n </table>\n</div>"
      },
      "contained" : [
        {
          "resourceType" : "Library",
          "id" : "effective-data-requirements",
          "extension" : [
            {
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode",
              "valueCoding" : {
                "system" : "http://hl7.org/fhir/administrative-gender",
                "code" : "M",
                "display" : "Male"
              }
            },
            {
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode",
              "valueCoding" : {
                "system" : "http://hl7.org/fhir/administrative-gender",
                "code" : "F",
                "display" : "Female"
              }
            },
            {
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode",
              "valueCoding" : {
                "system" : "http://terminology.hl7.org/CodeSystem/medicationrequest-category",
                "code" : "community",
                "display" : "Community"
              }
            },
            {
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode",
              "valueCoding" : {
                "system" : "http://terminology.hl7.org/CodeSystem/medicationrequest-category",
                "code" : "discharge",
                "display" : "Discharge"
              }
            },
            {
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode",
              "valueCoding" : {
                "system" : "http://terminology.hl7.org/CodeSystem/condition-category",
                "code" : "problem-list-item",
                "display" : "Problem List Item"
              }
            },
            {
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-directReferenceCode",
              "valueCoding" : {
                "system" : "http://hl7.org/fhir/us/core/CodeSystem/condition-category",
                "code" : "health-concern",
                "display" : "Health Concern"
              }
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "SupplementalDataElements"
                },
                {
                  "url" : "name",
                  "valueString" : "SDE Sex"
                },
                {
                  "url" : "statement",
                  "valueString" : "define \"SDE Sex\":\n case\n when Patient.gender = 'male' then \"M\"\n when Patient.gender = 'female' then \"F\"\n else null\n end"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 0
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "CMS506FHIRSafeUseofOpioids"
                },
                {
                  "url" : "name",
                  "valueString" : "SDE Sex"
                },
                {
                  "url" : "statement",
                  "valueString" : "define \"SDE Sex\":\n SDE.\"SDE Sex\""
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 1
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "CQMCommon"
                },
                {
                  "url" : "name",
                  "valueString" : "Inpatient Encounter"
                },
                {
                  "url" : "statement",
                  "valueString" : "define \"Inpatient Encounter\":\n [Encounter: \"Encounter Inpatient\"] EncounterInpatient\n\t\twhere EncounterInpatient.status = 'finished'\n\t\tand EncounterInpatient.period ends during day of \"Measurement Period\""
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 2
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "CMS506FHIRSafeUseofOpioids"
                },
                {
                  "url" : "name",
                  "valueString" : "Inpatient Encounter with Age Greater than or Equal to 18"
                },
                {
                  "url" : "statement",
                  "valueString" : "define \"Inpatient Encounter with Age Greater than or Equal to 18\":\n CQMCommon.\"Inpatient Encounter\" InpatientHospitalEncounter\n where AgeInYearsAt(date from start of InpatientHospitalEncounter.period) >= 18"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 3
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "CMS506FHIRSafeUseofOpioids"
                },
                {
                  "url" : "name",
                  "valueString" : "Opioid at Discharge"
                },
                {
                  "url" : "statement",
                  "valueString" : "define \"Opioid at Discharge\":\n ( [\"MedicationRequest\": \"Schedule II, III and IV Opioid Medications\"] OpioidMedications\n where ( OpioidMedications.isCommunity ( )\n or OpioidMedications.isDischarge ( )\n ) ) OpioidDischargeMedication\n where OpioidDischargeMedication.status in { 'active', 'completed' }\n and OpioidDischargeMedication.intent = 'order'"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 4
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "CMS506FHIRSafeUseofOpioids"
                },
                {
                  "url" : "name",
                  "valueString" : "Benzodiazepine at Discharge"
                },
                {
                  "url" : "statement",
                  "valueString" : "define \"Benzodiazepine at Discharge\":\n ( [\"MedicationRequest\": medication in \"Schedule IV Benzodiazepines\"] BenzoMedications\n where ( BenzoMedications.isCommunity ( )\n or BenzoMedications.isDischarge ( )\n ) ) BenzodiazepineDischargeMedication\n where BenzodiazepineDischargeMedication.status in { 'active', 'completed' }\n and BenzodiazepineDischargeMedication.intent = 'order'"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 5
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "CMS506FHIRSafeUseofOpioids"
                },
                {
                  "url" : "name",
                  "valueString" : "Inpatient Encounters with an Opioid or Benzodiazepine at Discharge"
                },
                {
                  "url" : "statement",
                  "valueString" : "define \"Inpatient Encounters with an Opioid or Benzodiazepine at Discharge\":\n/*Captures encounters of patients with an opioid and/or benzodiazepine at discharge*/\n \n \"Inpatient Encounter with Age Greater than or Equal to 18\" InpatientEncounter\n with ( \"Opioid at Discharge\"\n union \"Benzodiazepine at Discharge\" ) OpioidOrBenzodiazepineAtDischarge\n such that OpioidOrBenzodiazepineAtDischarge.authoredOn during day of InpatientEncounter.period"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 6
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "CMS506FHIRSafeUseofOpioids"
                },
                {
                  "url" : "name",
                  "valueString" : "Numerator"
                },
                {
                  "url" : "statement",
                  "valueString" : "define \"Numerator\":\n /*Encounters of patients prescribed two or more opioids or an opioid and benzodiazepine at discharge.*/\n \n ( ( \"Inpatient Encounters with an Opioid or Benzodiazepine at Discharge\" InpatientEncounter\n where ( Count(\"Opioid at Discharge\" OpioidMedications\n where OpioidMedications.authoredOn during day of InpatientEncounter.period\n return distinct OpioidMedications.medication\n ) >= 2\n )\n or exists ( \"Opioid at Discharge\" OpioidDischargeMedications\n where OpioidDischargeMedications.authoredOn during day of InpatientEncounter.period\n and exists \"Benzodiazepine at Discharge\" BenzodiazepineDischargeMedication\n where BenzodiazepineDischargeMedication.authoredOn during day of InpatientEncounter.period\n )\n )\n )"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 7
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "CMS506FHIRSafeUseofOpioids"
                },
                {
                  "url" : "name",
                  "valueString" : "Initial Population"
                },
                {
                  "url" : "statement",
                  "valueString" : "define \"Initial Population\":\n \"Inpatient Encounters with an Opioid or Benzodiazepine at Discharge\""
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 8
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "CMS506FHIRSafeUseofOpioids"
                },
                {
                  "url" : "name",
                  "valueString" : "Denominator"
                },
                {
                  "url" : "statement",
                  "valueString" : "define \"Denominator\":\n \"Initial Population\""
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 9
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "SupplementalDataElements"
                },
                {
                  "url" : "name",
                  "valueString" : "SDE Payer"
                },
                {
                  "url" : "statement",
                  "valueString" : "define \"SDE Payer\":\n [Coverage: type in \"Payer Type\"] Payer\n return {\n code: Payer.type,\n period: Payer.period\n }"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 10
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "CMS506FHIRSafeUseofOpioids"
                },
                {
                  "url" : "name",
                  "valueString" : "SDE Payer"
                },
                {
                  "url" : "statement",
                  "valueString" : "define \"SDE Payer\":\n SDE.\"SDE Payer\""
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 11
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "SupplementalDataElements"
                },
                {
                  "url" : "name",
                  "valueString" : "SDE Ethnicity"
                },
                {
                  "url" : "statement",
                  "valueString" : "define \"SDE Ethnicity\":\n Patient.ethnicity E\n return Tuple {\n codes: { E.ombCategory } union E.detailed,\n display: E.text\n }"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 12
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "CMS506FHIRSafeUseofOpioids"
                },
                {
                  "url" : "name",
                  "valueString" : "SDE Ethnicity"
                },
                {
                  "url" : "statement",
                  "valueString" : "define \"SDE Ethnicity\":\n SDE.\"SDE Ethnicity\""
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 13
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "CMS506FHIRSafeUseofOpioids"
                },
                {
                  "url" : "name",
                  "valueString" : "Treatment for Opioid Use Disorders"
                },
                {
                  "url" : "statement",
                  "valueString" : "define \"Treatment for Opioid Use Disorders\":\n ( [\"MedicationRequest\": \"Medications for Opioid Use Disorder (MOUD)\"] MedicationTreatment\n with [\"Procedure\": \"Opioid Medication Assisted Treatment (MAT)\"] MAT\n such that MedicationTreatment.authoredOn during day of MAT.performed.toInterval ( )\n and MedicationTreatment.authoredOn during day of \"Measurement Period\"\n )\n union ( [\"MedicationRequest\": \"Medications for Opioid Use Disorder (MOUD)\"] MedicationTreatment\n with [\"Condition\": \"Opioid Use Disorder\"] OUD\n such that MedicationTreatment.authoredOn during day of OUD.prevalenceInterval ( )\n and OUD.prevalenceInterval ( ) overlaps day of \"Measurement Period\"\n )"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 14
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "CMS506FHIRSafeUseofOpioids"
                },
                {
                  "url" : "name",
                  "valueString" : "Intervention Palliative or Hospice Care"
                },
                {
                  "url" : "statement",
                  "valueString" : "define \"Intervention Palliative or Hospice Care\":\n [\"ServiceRequest\": \"Palliative or Hospice Care\"]\n union [\"Procedure\": \"Palliative or Hospice Care\"]"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 15
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "CMS506FHIRSafeUseofOpioids"
                },
                {
                  "url" : "name",
                  "valueString" : "Denominator Exclusion"
                },
                {
                  "url" : "statement",
                  "valueString" : "define \"Denominator Exclusion\":\n /*Excludes encounters of patients with cancer pain or who are receiving palliative or hospice care at the time of the encounter or who receive treatment for opioid use disorder, have sickle cell disease, or who are discharged to another inpatient care facility or discharged against medical advice, or expire during the inpatient stay*/\n \n ( \"Inpatient Encounters with an Opioid or Benzodiazepine at Discharge\" InpatientEncounter\n where exists ( [\"Condition\": \"Cancer Related Pain\"] CancerPain\n where ( CancerPain.isProblemListItem ( )\n or CancerPain.isHealthConcern ( )\n )\n and CancerPain.prevalenceInterval ( ) overlaps day of InpatientEncounter.period\n )\n or exists ( ( InpatientEncounter.encounterDiagnosis ( ) ) InpatientEncounterDiagnosis\n where InpatientEncounterDiagnosis.code in \"Cancer Related Pain\"\n )\n or exists ( [\"Condition\": \"Sickle Cell Disease with and without Crisis\"] SickleCellDisease\n where SickleCellDisease.prevalenceInterval ( ) overlaps day of InpatientEncounter.period\n )\n or exists ( \"Treatment for Opioid Use Disorders\" OUDTreatment\n where OUDTreatment.authoredOn during day of InpatientEncounter.period\n )\n or exists ( \"Intervention Palliative or Hospice Care\" PalliativeOrHospiceCare\n where Coalesce(start of PalliativeOrHospiceCare.performed.toInterval(), PalliativeOrHospiceCare.authoredOn) during day of InpatientEncounter.\"hospitalizationWithObservation\" ( )\n )\n or ( InpatientEncounter.hospitalization.dischargeDisposition in \"Discharge To Acute Care Facility\"\n or InpatientEncounter.hospitalization.dischargeDisposition in \"Hospice Care Referral or Admission\"\n or InpatientEncounter.hospitalization.dischargeDisposition in \"Patient Expired\"\n or InpatientEncounter.hospitalization.dischargeDisposition in \"Left Against Medical Advice\"\n )\n )"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 16
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "SupplementalDataElements"
                },
                {
                  "url" : "name",
                  "valueString" : "SDE Race"
                },
                {
                  "url" : "statement",
                  "valueString" : "define \"SDE Race\":\n Patient.race R\n return Tuple {\n codes: R.ombCategory union R.detailed,\n display: R.text\n }"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 17
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "CMS506FHIRSafeUseofOpioids"
                },
                {
                  "url" : "name",
                  "valueString" : "SDE Race"
                },
                {
                  "url" : "statement",
                  "valueString" : "define \"SDE Race\":\n SDE.\"SDE Race\""
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 18
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "QICoreCommon"
                },
                {
                  "url" : "name",
                  "valueString" : "isCommunity"
                },
                {
                  "url" : "statement",
                  "valueString" : "/*\n@description: Returns true if the given MedicationRequest has a category of Community\n*/\ndefine fluent function isCommunity(medicationRequest MedicationRequest):\n exists (medicationRequest.category C\n where C ~ Community\n )"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 19
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "FHIRHelpers"
                },
                {
                  "url" : "name",
                  "valueString" : "ToConcept"
                },
                {
                  "url" : "statement",
                  "valueString" : "/*\n@description: Converts the given FHIR [CodeableConcept](https://hl7.org/fhir/datatypes.html#CodeableConcept) value to a CQL Concept.\n*/\ndefine function ToConcept(concept FHIR.CodeableConcept):\n if concept is null then\n null\n else\n System.Concept {\n codes: concept.coding C return ToCode(C),\n display: concept.text.value\n }"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 20
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "QICoreCommon"
                },
                {
                  "url" : "name",
                  "valueString" : "isDischarge"
                },
                {
                  "url" : "statement",
                  "valueString" : "/*\n@description: Returns true if the given MedicationRequest has a category of Discharge\n*/\ndefine fluent function isDischarge(medicationRequest MedicationRequest):\n exists (medicationRequest.category C\n where C ~ Discharge\n )"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 21
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "FHIRHelpers"
                },
                {
                  "url" : "name",
                  "valueString" : "ToString"
                },
                {
                  "url" : "statement",
                  "valueString" : "define function ToString(value uri): value.value"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 22
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "FHIRHelpers"
                },
                {
                  "url" : "name",
                  "valueString" : "ToCode"
                },
                {
                  "url" : "statement",
                  "valueString" : "/*\n@description: Converts the given FHIR [Coding](https://hl7.org/fhir/datatypes.html#Coding) value to a CQL Code.\n*/\ndefine function ToCode(coding FHIR.Coding):\n if coding is null then\n null\n else\n System.Code {\n code: coding.code.value,\n system: coding.system.value,\n version: coding.version.value,\n display: coding.display.value\n }"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 23
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "QICoreCommon"
                },
                {
                  "url" : "name",
                  "valueString" : "isProblemListItem"
                },
                {
                  "url" : "statement",
                  "valueString" : "/*\n@description: Returns true if the given condition is a problem list item.\n*/\ndefine fluent function isProblemListItem(condition Condition):\n exists (condition.category C\n where C ~ \"problem-list-item\"\n )"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 24
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "QICoreCommon"
                },
                {
                  "url" : "name",
                  "valueString" : "isHealthConcern"
                },
                {
                  "url" : "statement",
                  "valueString" : "/*\n@description: Returns true if the given condition is a health concern\n*/\ndefine fluent function isHealthConcern(condition Condition):\n exists (condition.category C\n where C ~ \"health-concern\"\n )"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 25
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "QICoreCommon"
                },
                {
                  "url" : "name",
                  "valueString" : "prevalenceInterval"
                },
                {
                  "url" : "statement",
                  "valueString" : "/*\n@description: Returns an interval representing the normalized prevalence period of a given Condition.\n@comment: Uses the ToInterval and ToAbatementInterval functions to determine the widest potential interval from\nonset to abatement as specified in the given Condition. If the condition is active, or has an abatement date the resulting \ninterval will have a closed ending boundary. Otherwise, the resulting interval will have an open ending boundary.\n*/\ndefine fluent function prevalenceInterval(condition Condition):\nif condition.clinicalStatus ~ \"active\"\n or condition.clinicalStatus ~ \"recurrence\"\n or condition.clinicalStatus ~ \"relapse\" then\n Interval[start of condition.onset.toInterval(), end of condition.abatementInterval()]\nelse\n (end of condition.abatementInterval()) abatementDate\n return if abatementDate is null then\n Interval[start of condition.onset.toInterval(), abatementDate)\n else\n Interval[start of condition.onset.toInterval(), abatementDate]"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 26
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "CQMCommon"
                },
                {
                  "url" : "name",
                  "valueString" : "encounterDiagnosis"
                },
                {
                  "url" : "statement",
                  "valueString" : "/*\n@description: Returns the Condition resources referenced by the diagnosis element of the Encounter\n*/\ndefine fluent function encounterDiagnosis(Encounter Encounter ):\n Encounter.diagnosis D\n return singleton from ([Condition] C where C.id = D.condition.reference.getId())"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 27
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "QICoreCommon"
                },
                {
                  "url" : "name",
                  "valueString" : "getId"
                },
                {
                  "url" : "statement",
                  "valueString" : "/*\n@description: Returns the tail of the given uri (i.e. everything after the last slash in the URI).\n@comment: This function can be used to determine the logical id of a given resource. It can be used in\na single-server environment to trace references. However, this function does not attempt to resolve\nor distinguish the base of the given url, and so cannot be used safely in multi-server environments.\n*/\ndefine fluent function getId(uri String):\n Last(Split(uri, '/'))"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 28
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            },
            {
              "extension" : [
                {
                  "url" : "libraryName",
                  "valueString" : "CQMCommon"
                },
                {
                  "url" : "name",
                  "valueString" : "hospitalizationWithObservation"
                },
                {
                  "url" : "statement",
                  "valueString" : "/*\n@description: Hospitalization with Observation returns the total interval from the start of any immediately prior emergency department visit through the observation visit to the discharge of the given encounter\n*/\ndefine fluent function hospitalizationWithObservation(TheEncounter Encounter ):\n TheEncounter Visit\n \t\tlet ObsVisit: Last([Encounter: \"Observation Services\"] LastObs\n \t\t\t\twhere LastObs.status = 'finished'\n and LastObs.period ends 1 hour or less on or before start of Visit.period\n \t\t\t\tsort by end of period\n \t\t\t),\n \t\t\tVisitStart: Coalesce(start of ObsVisit.period, start of Visit.period),\n \t\t\tEDVisit: Last([Encounter: \"Emergency Department Visit\"] LastED\n \t\t\t\twhere LastED.status = 'finished'\n and LastED.period ends 1 hour or less on or before VisitStart\n \t\t\t\tsort by end of period\n \t\t\t)\n \t\treturn Interval[Coalesce(start of EDVisit.period, VisitStart), end of Visit.period]"
                },
                {
                  "url" : "displaySequence",
                  "valueInteger" : 29
                }
              ],
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-logicDefinition"
            }
          ],
          "name" : "EffectiveDataRequirements",
          "status" : "active",
          "type" : {
            "coding" : [
              {
                "system" : "http://terminology.hl7.org/CodeSystem/library-type",
                "code" : "module-definition"
              }
            ]
          },
          "relatedArtifact" : [
            {
              "type" : "depends-on",
              "display" : "Library SDE",
              "resource" : "Library/SupplementalDataElements|3.5.000"
            },
            {
              "type" : "depends-on",
              "display" : "Library CQMCommon",
              "resource" : "Library/CQMCommon|2.2.000"
            },
            {
              "type" : "depends-on",
              "display" : "Library FHIRHelpers",
              "resource" : "Library/FHIRHelpers|4.4.000"
            },
            {
              "type" : "depends-on",
              "display" : "Library QICoreCommon",
              "resource" : "Library/QICoreCommon|2.1.000"
            },
            {
              "type" : "depends-on",
              "display" : "Code system AdministrativeGender",
              "resource" : "http://hl7.org/fhir/administrative-gender"
            },
            {
              "type" : "depends-on",
              "display" : "Code system MedicationRequestCategory",
              "resource" : "http://terminology.hl7.org/CodeSystem/medicationrequest-category"
            },
            {
              "type" : "depends-on",
              "display" : "Code system ConditionCategory",
              "resource" : "http://terminology.hl7.org/CodeSystem/condition-category"
            },
            {
              "type" : "depends-on",
              "display" : "Code system USCoreConditionCategoryExtensionCodes",
              "resource" : "http://hl7.org/fhir/us/core/CodeSystem/condition-category"
            },
            {
              "type" : "depends-on",
              "display" : "Value set Encounter Inpatient",
              "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307"
            },
            {
              "type" : "depends-on",
              "display" : "Value set Schedule II, III and IV Opioid Medications",
              "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.241"
            },
            {
              "type" : "depends-on",
              "display" : "Value set Schedule IV Benzodiazepines",
              "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1125.1"
            },
            {
              "type" : "depends-on",
              "display" : "Value set Payer Type",
              "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591"
            },
            {
              "type" : "depends-on",
              "display" : "Value set Cancer Related Pain",
              "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.180"
            },
            {
              "type" : "depends-on",
              "display" : "Value set Sickle Cell Disease with and without Crisis",
              "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.175"
            },
            {
              "type" : "depends-on",
              "display" : "Value set Medications for Opioid Use Disorder (MOUD)",
              "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.269"
            },
            {
              "type" : "depends-on",
              "display" : "Value set Opioid Medication Assisted Treatment (MAT)",
              "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.177"
            },
            {
              "type" : "depends-on",
              "display" : "Value set Opioid Use Disorder",
              "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.171"
            },
            {
              "type" : "depends-on",
              "display" : "Value set Palliative or Hospice Care",
              "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.600.1.1579"
            },
            {
              "type" : "depends-on",
              "display" : "Value set Observation Services",
              "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.143"
            },
            {
              "type" : "depends-on",
              "display" : "Value set Emergency Department Visit",
              "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292"
            },
            {
              "type" : "depends-on",
              "display" : "Value set Discharge To Acute Care Facility",
              "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.87"
            },
            {
              "type" : "depends-on",
              "display" : "Value set Hospice Care Referral or Admission",
              "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1116.365"
            },
            {
              "type" : "depends-on",
              "display" : "Value set Patient Expired",
              "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.309"
            },
            {
              "type" : "depends-on",
              "display" : "Value set Left Against Medical Advice",
              "resource" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.308"
            }
          ],
          "parameter" : [
            {
              "name" : "Measurement Period",
              "use" : "in",
              "min" : 0,
              "max" : "1",
              "type" : "Period"
            },
            {
              "name" : "SDE Sex",
              "use" : "out",
              "min" : 0,
              "max" : "1",
              "type" : "Coding"
            },
            {
              "name" : "Numerator",
              "use" : "out",
              "min" : 0,
              "max" : "*",
              "type" : "Resource"
            },
            {
              "name" : "Denominator",
              "use" : "out",
              "min" : 0,
              "max" : "*",
              "type" : "Resource"
            },
            {
              "name" : "SDE Payer",
              "use" : "out",
              "min" : 0,
              "max" : "*",
              "type" : "Resource"
            },
            {
              "name" : "Initial Population",
              "use" : "out",
              "min" : 0,
              "max" : "*",
              "type" : "Resource"
            },
            {
              "name" : "SDE Ethnicity",
              "use" : "out",
              "min" : 0,
              "max" : "1",
              "type" : "Resource"
            },
            {
              "name" : "Denominator Exclusion",
              "use" : "out",
              "min" : 0,
              "max" : "*",
              "type" : "Resource"
            },
            {
              "name" : "SDE Race",
              "use" : "out",
              "min" : 0,
              "max" : "1",
              "type" : "Resource"
            }
          ],
          "dataRequirement" : [
            {
              "type" : "Patient",
              "profile" : [
                "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-patient"
              ],
              "mustSupport" : [
                "ethnicity",
                "race"
              ]
            },
            {
              "type" : "Encounter",
              "profile" : [
                "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"
              ],
              "mustSupport" : [
                "type",
                "status",
                "status.value",
                "period",
                "condition",
                "condition.reference",
                "condition.reference.value",
                "hospitalization",
                "hospitalization.dischargeDisposition"
              ],
              "codeFilter" : [
                {
                  "path" : "type",
                  "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307"
                },
                {
                  "path" : "status.value",
                  "code" : [
                    {
                      "code" : "finished"
                    }
                  ]
                }
              ],
              "dateFilter" : [
                {
                  "path" : "period",
                  "valuePeriod" : {
                    "extension" : [
                      {
                        "url" : "http://hl7.org/fhir/StructureDefinition/cqf-expression",
                        "valueExpression" : {
                          "language" : "text/cql-identifier",
                          "expression" : "Measurement Period"
                        }
                      }
                    ]
                  }
                }
              ]
            },
            {
              "type" : "Encounter",
              "profile" : [
                "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"
              ],
              "mustSupport" : [
                "type",
                "status",
                "status.value",
                "period",
                "condition",
                "condition.reference",
                "condition.reference.value",
                "hospitalization",
                "hospitalization.dischargeDisposition"
              ],
              "codeFilter" : [
                {
                  "path" : "type",
                  "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.143"
                },
                {
                  "path" : "status.value",
                  "code" : [
                    {
                      "code" : "finished"
                    }
                  ]
                }
              ]
            },
            {
              "type" : "Encounter",
              "profile" : [
                "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-encounter"
              ],
              "mustSupport" : [
                "type",
                "status",
                "status.value",
                "period",
                "condition",
                "condition.reference",
                "condition.reference.value",
                "hospitalization",
                "hospitalization.dischargeDisposition"
              ],
              "codeFilter" : [
                {
                  "path" : "type",
                  "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.117.1.7.1.292"
                },
                {
                  "path" : "status.value",
                  "code" : [
                    {
                      "code" : "finished"
                    }
                  ]
                }
              ],
              "dateFilter" : [
                {
                  "path" : "period",
                  "valuePeriod" : {
                    "extension" : [
                      {
                        "url" : "http://hl7.org/fhir/uv/crmi-analysisException",
                        "valueString" : "Error attempting to determine filter value: toFhirValue not implemented for Subtract"
                      }
                    ]
                  }
                }
              ]
            },
            {
              "type" : "Medication",
              "profile" : [
                "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medication"
              ],
              "mustSupport" : [
                "id"
              ]
            },
            {
              "type" : "Medication",
              "profile" : [
                "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medication"
              ],
              "mustSupport" : [
                "id"
              ]
            },
            {
              "type" : "Medication",
              "profile" : [
                "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medication"
              ],
              "mustSupport" : [
                "id"
              ]
            },
            {
              "type" : "MedicationRequest",
              "profile" : [
                "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medicationrequest"
              ],
              "mustSupport" : [
                "medication",
                "status",
                "status.value",
                "intent",
                "intent.value",
                "authoredOn",
                "authoredOn.value"
              ],
              "codeFilter" : [
                {
                  "path" : "medication",
                  "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.241"
                }
              ]
            },
            {
              "type" : "MedicationRequest",
              "profile" : [
                "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medicationrequest"
              ],
              "mustSupport" : [
                "medication",
                "status",
                "status.value",
                "intent",
                "intent.value",
                "authoredOn",
                "authoredOn.value"
              ],
              "codeFilter" : [
                {
                  "path" : "medication",
                  "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1125.1"
                }
              ]
            },
            {
              "type" : "MedicationRequest",
              "profile" : [
                "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medicationrequest"
              ],
              "mustSupport" : [
                "medication",
                "status",
                "status.value",
                "intent",
                "intent.value",
                "authoredOn",
                "authoredOn.value"
              ],
              "codeFilter" : [
                {
                  "path" : "medication",
                  "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1125.1"
                },
                {
                  "path" : "intent.value",
                  "code" : [
                    {
                      "code" : "order"
                    }
                  ]
                }
              ]
            },
            {
              "type" : "MedicationRequest",
              "profile" : [
                "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medicationrequest"
              ],
              "mustSupport" : [
                "medication.reference",
                "status",
                "status.value",
                "intent",
                "intent.value",
                "authoredOn",
                "authoredOn.value",
                "medication"
              ]
            },
            {
              "type" : "MedicationRequest",
              "profile" : [
                "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medicationrequest"
              ],
              "mustSupport" : [
                "medication",
                "status",
                "status.value",
                "intent",
                "intent.value",
                "authoredOn",
                "authoredOn.value"
              ],
              "codeFilter" : [
                {
                  "path" : "medication",
                  "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1046.269"
                }
              ]
            },
            {
              "type" : "Coverage",
              "profile" : [
                "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-coverage"
              ],
              "mustSupport" : [
                "type",
                "period"
              ],
              "codeFilter" : [
                {
                  "path" : "type",
                  "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591"
                }
              ]
            },
            {
              "type" : "Condition",
              "profile" : [
                "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition"
              ],
              "mustSupport" : [
                "id",
                "id.value",
                "code"
              ]
            },
            {
              "type" : "Condition",
              "profile" : [
                "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition"
              ],
              "mustSupport" : [
                "code"
              ],
              "codeFilter" : [
                {
                  "path" : "code",
                  "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.171"
                }
              ]
            },
            {
              "type" : "Condition",
              "profile" : [
                "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition"
              ],
              "mustSupport" : [
                "code"
              ],
              "codeFilter" : [
                {
                  "path" : "code",
                  "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.180"
                }
              ]
            },
            {
              "type" : "Condition",
              "profile" : [
                "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-condition"
              ],
              "mustSupport" : [
                "code"
              ],
              "codeFilter" : [
                {
                  "path" : "code",
                  "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.175"
                }
              ]
            },
            {
              "type" : "Procedure",
              "profile" : [
                "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure"
              ],
              "mustSupport" : [
                "code",
                "performed"
              ],
              "codeFilter" : [
                {
                  "path" : "code",
                  "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1111.177"
                }
              ]
            },
            {
              "type" : "Procedure",
              "profile" : [
                "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-procedure"
              ],
              "mustSupport" : [
                "code"
              ],
              "codeFilter" : [
                {
                  "path" : "code",
                  "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.600.1.1579"
                }
              ]
            },
            {
              "type" : "ServiceRequest",
              "profile" : [
                "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-servicerequest"
              ],
              "mustSupport" : [
                "code"
              ],
              "codeFilter" : [
                {
                  "path" : "code",
                  "valueSet" : "http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.600.1.1579"
                }
              ]
            }
          ]
        }
      ],
      "extension" : [
        {
          "id" : "supplementalDataGuidance",
          "extension" : [
            {
              "url" : "guidance",
              "valueString" : "For every patient evaluated by this measure also identify payer, race, ethnicity and sex; \nSDE Ethnicity \nSDE Payer \nSDE Race \nSDE Sex \n "
            },
            {
              "url" : "usage",
              "valueCodeableConcept" : {
                "coding" : [
                  {
                    "system" : "http://terminology.hl7.org/CodeSystem/measure-data-usage",
                    "code" : "supplemental-data",
                    "display" : "Supplemental Data"
                  }
                ],
                "text" : "Supplemental Data Guidance"
              }
            }
          ],
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-supplementalDataGuidance"
        },
        {
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-softwaresystem",
          "valueReference" : {
            "reference" : "Device/cqf-tooling"
          }
        },
        {
          "id" : "effective-data-requirements",
          "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-effectiveDataRequirements",
          "valueReference" : {
            "reference" : "#effective-data-requirements"
          }
        }
      ],
      "url" : "https://madie.cms.gov/Measure/CMS506FHIRSafeUseofOpioids",
      "identifier" : [
        {
          "use" : "usual",
          "type" : {
            "coding" : [
              {
                "system" : "http://hl7.org/fhir/us/cqfmeasures/CodeSystem/identifier-type",
                "code" : "short-name",
                "display" : "Short Name"
              }
            ]
          },
          "system" : "https://madie.cms.gov/measure/shortName",
          "value" : "CMS506FHIR "
        },
        {
          "use" : "official",
          "type" : {
            "coding" : [
              {
                "system" : "http://hl7.org/fhir/us/cqfmeasures/CodeSystem/identifier-type",
                "code" : "version-independent",
                "display" : "Version Independent"
              }
            ]
          },
          "system" : "urn:ietf:rfc:3986",
          "value" : "urn:uuid:95d529af-66b4-4cfd-bc1f-f43704dc47ad"
        },
        {
          "use" : "official",
          "type" : {
            "coding" : [
              {
                "system" : "http://hl7.org/fhir/us/cqfmeasures/CodeSystem/identifier-type",
                "code" : "version-specific",
                "display" : "Version Specific"
              }
            ]
          },
          "system" : "urn:ietf:rfc:3986",
          "value" : "urn:uuid:c8f62fe1-8d6d-4e05-9574-7f89899e4ec7"
        },
        {
          "use" : "official",
          "type" : {
            "coding" : [
              {
                "system" : "http://hl7.org/fhir/us/cqfmeasures/CodeSystem/identifier-type",
                "code" : "endorser",
                "display" : "Endorser"
              }
            ]
          },
          "system" : "https://madie.cms.gov/measure/cbeId",
          "value" : "3316e",
          "assigner" : {
            "display" : "CMS Consensus Based Entity"
          }
        },
        {
          "use" : "official",
          "type" : {
            "coding" : [
              {
                "system" : "http://hl7.org/fhir/us/cqfmeasures/CodeSystem/identifier-type",
                "code" : "publisher",
                "display" : "Publisher"
              }
            ]
          },
          "system" : "https://madie.cms.gov/measure/cmsId",
          "value" : "506FHIR",
          "assigner" : {
            "display" : "CMS"
          }
        }
      ],
      "version" : "Draft based on 0.2.001",
      "name" : "CMS506FHIRSafeUseofOpioids",
      "title" : "Safe Use of Opioids Concurrent PrescribingFHIR",
      "status" : "draft",
      "experimental" : false,
      "date" : "2024-12-16T18:17:11+00:00",
      "publisher" : "Centers for Medicare & Medicaid Services (CMS)",
      "contact" : [
        {
          "telecom" : [
            {
              "system" : "url",
              "value" : "https://www.cms.gov/"
            }
          ]
        }
      ],
      "description" : "Proportion of inpatient hospitalizations for patients 18 years of age and older prescribed, or continued on, two or more opioids or an opioid and benzodiazepine concurrently at discharge",
      "purpose" : "UNKNOWN",
      "usage" : "Clinician judgement, clinical appropriateness, or both may indicate concurrent prescribing of two unique opioids or an opioid and benzodiazepine is medically necessary, thus the measure is not expected to have a zero rate. \n\nInpatient hospitalizations with discharge medications of an opioid or benzodiazepine prescription should be included in the initial population. \n\nInpatient hospitalizations with discharge medications of two or more opioids or an opioid and benzodiazepine resulting in concurrent therapy at discharge should be included in the numerator. Each benzodiazepine and opioid included on the medication discharge list is considered a unique prescription.\n\nThe denominator population includes patients with inpatient hospitalizations and patients from Acute Hospital Care at Home programs, who are treated and billed as inpatients but receive care in their home.\n\nThis eCQM is an episode-based measure. An episode is defined as each inpatient hospitalization or encounter that ends during the measurement period. \n\nThis FHIR-based measure has been derived from the QDM-based measure: CMS 506v8.0. Please refer to the HL7 QI-Core Implementation Guide (https://hl7.org/fhir/us/qicore/STU4.1.1/) for more information on QI-Core and mapping recommendations from QDM to QI-Core 4.1.1 (https://hl7.org/fhir/us/qicore/STU4.1.1/qdm-to-qicore.html).",
      "copyright" : "Limited proprietary coding is contained in the Measure specifications for user convenience. Users of proprietary code sets should obtain all necessary licenses from the owners of the code sets. Mathematica disclaims all liability for use or accuracy of any third-party codes contained in the specifications.\n\nCPT(R) contained in the measure specifications is copyright 2004-2024 American Medical Association. LOINC(R) copyright 2004-2024 Regenstrief Institute, Inc. This material contains SNOMED Clinical Terms(R) (SNOMED CT[R]) copyright 2004-2024 International Health Terminology Standards Development Organisation. ICD-10 copyright 2024 World Health Organization. All Rights Reserved.",
      "effectivePeriod" : {
        "start" : "2026-01-01",
        "end" : "2026-12-31"
      },
      "author" : [
        {
          "name" : "Mathematica",
          "telecom" : [
            {
              "system" : "url",
              "value" : "https://www.mathematica.org/"
            }
          ]
        }
      ],
      "library" : [
        "https://madie.cms.gov/Library/CMS506FHIRSafeUseofOpioids"
      ],
      "disclaimer" : "These performance measures are not clinical guidelines, do not establish a standard of medical care, and have not been tested for all potential applications.\n\nTHE MEASURES AND SPECIFICATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND.\n\nDue to technical limitations, registered trademarks are indicated by (R) or [R] and unregistered trademarks are indicated by (TM) or [TM].",
      "rationale" : "Unintentional opioid overdose fatalities have become a major public health concern in the United States (Rudd, Aleshire, Zibbel, & Gladden, 2016). Reducing the number of unintentional overdoses has become a priority for numerous federal organizations including, but not limited to, the Centers for Disease Control and Prevention (CDC), the Federal Interagency Workgroup for Opioid Adverse Drug Events, and the Substance Abuse and Mental Health Services Administration. \n\nConcurrent prescriptions of opioids or opioids and benzodiazepines places patients at a greater risk of unintentional overdose due to the increased risk of respiratory depression (Dowell, Haegerich, & Chou, 2016; Dowell, Ragan, Jones, Baldwin, & Chou, 2022). An analysis of national prescribing patterns shows that more than half of patients who received an opioid prescription in 2009 had filled another opioid prescription within the previous 30 days (National Institute on Drug Abuse, 2011). Studies of multiple claims and prescription databases have shown that between 5%-15% of patients receive concurrent opioid prescriptions and 5%-20% of patients receive concurrent opioid and benzodiazepine prescriptions across various settings (Liu et al., 2013; Mack et al., 2015, Park et al., 2015). Patients who have multiple opioid prescriptions have an increased risk for overdose (Jena et al., 2014). Rates of fatal overdose are ten times higher in patients who are co-dispensed opioid analgesics and benzodiazepines than opioids alone (Dasgupta et al., 2015). The number of opioid overdose deaths involving benzodiazepines increased 14% on average each year from 2006 to 2011, while the number of opioid analgesic overdose deaths not involving benzodiazepines did not change significantly (Jones & McAninch, 2015). Furthermore, concurrent use of benzodiazepines with opioids was prevalent in 31%-51% of fatal overdoses (Dowell, Haegerich, & Chou, 2016). One study found that eliminating concurrent use of opioids and benzodiazepines could reduce the risk of opioid overdose-related emergency department (ED) and inpatient visits by 15% and potentially could have prevented an estimated 2,630 deaths related to opioid painkiller overdoses in 2015 (Sun, Dixit, Humphreys, Darnall, & Mackey, 2017). \n\nA study on The Opioid Safety Initiative in the Veterans Health Administration (VHA), which includes an opioid and benzodiazepine concurrent prescribing measure that this measure is based on, was associated with a decrease of 20.67% overall and 0.86% patients per month (781 patients per month) receiving concurrent benzodiazepine with an opioid among all adult VHA patients who filled outpatient opioid prescriptions from October 2012 to September 2014 (Lin, Bohnert, Kerns, Clay, Ganoczy, & Ilgen, 2017).\n\nAdopting a measure that calculates the proportion of patients with two or more opioids or opioids and benzodiazepines concurrently has the potential to reduce preventable mortality and reduce the costs associated with adverse events related to opioid use by (1) encouraging providers to identify patients with concurrent prescriptions of opioids or opioids and benzodiazepines and (2) discouraging providers from prescribing two or more opioids or opioids and benzodiazepines concurrently.",
      "clinicalRecommendationStatement" : "The CDC Clinical Practice Guideline for Prescribing Opioids for Pain — United States, 2022 recommends that clinicians should:\n- “[Use strategies minimizing] opioid use…for both opioid-naïve and opioid-tolerant patients with acute pain when possible. If patients receiving long-term opioid therapy require additional medication for acute pain, nonopioid medications should be used when possible.”\n- ”Use particular caution when prescribing opioid pain medication and benzodiazepines concurrently.\"\n- “Review increased risks for respiratory depression when opioids are taken with benzodiazepines, other sedatives, alcohol, nonprescribed or illicit drugs (e.g., heroin), or other opioids (see Recommendations 8 and 11)”\n- “Closely monitor patients who are unable to taper and who continue on high-dose or otherwise high-risk opioid regimens (e.g., opioids prescribed concurrently with benzodiazepines) and should work with patients to mitigate overdose risk (e.g., by providing overdose education and naloxone) (see Recommendation 8).”\n- \"Discuss information from the PDMP with the patient and confirm that the patient is aware of any additional prescriptions.”\n- “Discuss safety concerns, including increased risk for respiratory depression and overdose, with patients found to be receiving overlapping prescription opioids from multiple clinicians who are not coordinating the patient’s care or patients who are receiving medications that increase risk when combined with opioids (e.g., benzodiazepines) (see Recommendation 11), and offer naloxone (see Recommendation 8).\"\n- \"Discuss safety concerns with other clinicians who are prescribing controlled substances for the patient. Ideally, clinicians should first discuss concerns with the patient and inform them that they plan to coordinate care with their other clinicians to improve the patient’s safety.”\n\nIn addition to the 2022 CDC Clinical Practice Guideline for Prescribing Opioids for Pain, opioid prescribing guidelines issued by various state agencies and professional societies for various settings agree with the recommendation to avoid concurrently prescribing opioids (American Academy of Emergency Medicine (AAEM), 2013; and Washington Agency Medical Directors’ Group (WAMDG), 2015), and opioids and benzodiazepines (WAMDG, 2015; American Society of Interventional Pain Physicians (ASIPP), 2012;, and New York City Department Of Health and Mental Hygiene (NYC DPOMH), 2013) whenever possible as the combination of these medications may potentiate opioid-induced respiratory depression.",
      "guidance" : "Clinician judgement, clinical appropriateness, or both may indicate concurrent prescribing of two unique opioids or an opioid and benzodiazepine is medically necessary, thus the measure is not expected to have a zero rate. \n\nInpatient hospitalizations with discharge medications of an opioid or benzodiazepine prescription should be included in the initial population. \n\nInpatient hospitalizations with discharge medications of two or more opioids or an opioid and benzodiazepine resulting in concurrent therapy at discharge should be included in the numerator. Each benzodiazepine and opioid included on the medication discharge list is considered a unique prescription.\n\nThe denominator population includes patients with inpatient hospitalizations and patients from Acute Hospital Care at Home programs, who are treated and billed as inpatients but receive care in their home.\n\nThis eCQM is an episode-based measure. An episode is defined as each inpatient hospitalization or encounter that ends during the measurement period. \n\nThis FHIR-based measure has been derived from the QDM-based measure: CMS 506v8.0. Please refer to the HL7 QI-Core Implementation Guide (https://hl7.org/fhir/us/qicore/STU4.1.1/) for more information on QI-Core and mapping recommendations from QDM to QI-Core 4.1.1 (https://hl7.org/fhir/us/qicore/STU4.1.1/qdm-to-qicore.html).",
      "group" : [
        {
          "id" : "67460a2f46b6174510cfea5f",
          "extension" : [
            {
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-scoring",
              "valueCodeableConcept" : {
                "coding" : [
                  {
                    "system" : "http://terminology.hl7.org/CodeSystem/measure-scoring",
                    "code" : "proportion",
                    "display" : "Proportion"
                  }
                ]
              }
            },
            {
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-populationBasis",
              "valueCode" : "Encounter"
            },
            {
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-type",
              "valueCodeableConcept" : {
                "coding" : [
                  {
                    "system" : "http://terminology.hl7.org/CodeSystem/measure-type",
                    "code" : "process",
                    "display" : "Process"
                  }
                ]
              }
            },
            {
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-rateAggregation",
              "valueCode" : "None"
            },
            {
              "url" : "http://hl7.org/fhir/us/cqfmeasures/StructureDefinition/cqfm-improvementNotation",
              "valueCodeableConcept" : {
                "coding" : [
                  {
                    "system" : "http://terminology.hl7.org/CodeSystem/measure-improvement-notation",
                    "code" : "decrease",
                    "display" : "Decreased score indicates improvement"
                  }
                ]
              }
            }
          ],
          "description" : "Proportion of inpatient hospitalizations for patients 18 years of age and older prescribed two or more opioids or an opioid and benzodiazepine concurrently at discharge.",
          "population" : [
            {
              "id" : "345E1255-3623-402A-9016-2B5C9E096C26",
              "code" : {
                "coding" : [
                  {
                    "system" : "http://terminology.hl7.org/CodeSystem/measure-population",
                    "code" : "initial-population",
                    "display" : "Initial Population"
                  }
                ]
              },
              "description" : "Inpatient hospitalizations that end during the measurement period, where the patient is 18 years of age and older at the start of the encounter and prescribed one opioid and/or benzodiazepine at discharge",
              "criteria" : {
                "language" : "text/cql-identifier",
                "expression" : "Initial Population"
              }
            },
            {
              "id" : "9ED4F80C-B465-4CDB-BFDD-CE376A165DD0",
              "code" : {
                "coding" : [
                  {
                    "system" : "http://terminology.hl7.org/CodeSystem/measure-population",
                    "code" : "denominator",
                    "display" : "Denominator"
                  }
                ]
              },
              "description" : "Equals Initial Population",
              "criteria" : {
                "language" : "text/cql-identifier",
                "expression" : "Denominator"
              }
            },
            {
              "id" : "25C57870-241A-428F-BDA8-63C5B4685EE4",
              "code" : {
                "coding" : [
                  {
                    "system" : "http://terminology.hl7.org/CodeSystem/measure-population",
                    "code" : "denominator-exclusion",
                    "display" : "Denominator Exclusion"
                  }
                ]
              },
              "description" : "Inpatient hospitalizations where patients have cancer pain that begins prior to or during the encounter or are ordered or are receiving palliative or hospice care (including comfort measures, terminal care, and dying care) during the hospitalization or in an emergency department encounter or observation stay immediately prior to hospitalization, patients receiving medication for opioid use disorder (OUD) with active OUD diagnosis or Opioid Medication Assisted Treatment (MAT), patients with sickle cell disease, patients discharged to another inpatient care facility or left against medical advice, and patients who expire during the inpatient stay",
              "criteria" : {
                "language" : "text/cql-identifier",
                "expression" : "Denominator Exclusion"
              }
            },
            {
              "id" : "C36B952C-8CCF-436F-A9E2-423A00C56A1A",
              "code" : {
                "coding" : [
                  {
                    "system" : "http://terminology.hl7.org/CodeSystem/measure-population",
                    "code" : "numerator",
                    "display" : "Numerator"
                  }
                ]
              },
              "description" : "Inpatient hospitalizations where the patient is prescribed two or more opioids or an opioid and benzodiazepine at discharge",
              "criteria" : {
                "language" : "text/cql-identifier",
                "expression" : "Numerator"
              }
            }
          ]
        }
      ],
      "supplementalData" : [
        {
          "id" : "sde-ethnicity",
          "usage" : [
            {
              "coding" : [
                {
                  "system" : "http://terminology.hl7.org/CodeSystem/measure-data-usage",
                  "code" : "supplemental-data"
                }
              ]
            }
          ],
          "description" : "SDE Ethnicity",
          "criteria" : {
            "language" : "text/cql-identifier",
            "expression" : "SDE Ethnicity"
          }
        },
        {
          "id" : "sde-payer",
          "usage" : [
            {
              "coding" : [
                {
                  "system" : "http://terminology.hl7.org/CodeSystem/measure-data-usage",
                  "code" : "supplemental-data"
                }
              ]
            }
          ],
          "description" : "SDE Payer",
          "criteria" : {
            "language" : "text/cql-identifier",
            "expression" : "SDE Payer"
          }
        },
        {
          "id" : "sde-race",
          "usage" : [
            {
              "coding" : [
                {
                  "system" : "http://terminology.hl7.org/CodeSystem/measure-data-usage",
                  "code" : "supplemental-data"
                }
              ]
            }
          ],
          "description" : "SDE Race",
          "criteria" : {
            "language" : "text/cql-identifier",
            "expression" : "SDE Race"
          }
        },
        {
          "id" : "sde-sex",
          "usage" : [
            {
              "coding" : [
                {
                  "system" : "http://terminology.hl7.org/CodeSystem/measure-data-usage",
                  "code" : "supplemental-data"
                }
              ]
            }
          ],
          "description" : "SDE Sex",
          "criteria" : {
            "language" : "text/cql-identifier",
            "expression" : "SDE Sex"
          }
        }
      ]
    }

    XIG built as of ??metadata-date??. Found ??metadata-resources?? resources in ??metadata-packages?? packages.